Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

europass resume

array( 'name' => __('Europass Resumes'), 'singular_name' => __('Europass Resume') ), 'public' => false, // It's false because we don't need public archive 'show_ui' => true, 'supports' => array('title', 'custom-fields'), 'capability_type' => 'post', ) ); } add_action('init', 'create_resume_post_type'); // 2. Main Shortcode Function function europass_resume_builder_shortcode() { // Check if we're processing a form submission if (isset($_POST['submit_europass_resume']) && wp_verify_nonce($_POST['europass_nonce'], 'save_europass_resume')) { return process_resume_form(); } // Check if we're downloading a resume if (isset($_GET['download_resume']) && isset($_GET['resume_id'])) { return handle_resume_download(intval($_GET['resume_id'])); } // Show the main form return display_resume_form(); } add_shortcode('europass_resume_builder', 'europass_resume_builder_shortcode'); // 3. Display the Form function display_resume_form() { wp_enqueue_style('europass-form-css'); wp_enqueue_script('europass-form-js'); ob_start(); ?>

Europass Curriculum Vitae

Personal Information

Work Experience

Education and Training

Personal Skills

Other language(s)

Security check failed. Please try again.
'; } $current_user = wp_get_current_user(); $resume_data = array( 'post_title' => sanitize_text_field($_POST['first_name'] . ' ' . $_POST['last_name']), 'post_type' => 'europass_resume', 'post_status' => 'publish', 'post_author' => $current_user->ID ); $resume_id = wp_insert_post($resume_data); if (is_wp_error($resume_id)) { return '
Error saving your resume. Please try again.
'; } // Save all fields $fields_to_save = array( 'first_name', 'last_name', 'address', 'phone', 'email', 'nationality', 'mother_tongue', 'digital_skills' ); foreach ($fields_to_save as $field) { if (isset($_POST[$field])) { update_post_meta($resume_id, $field, sanitize_text_field($_POST[$field])); } } // Save array fields (work experience, education, languages) $array_fields = array( 'work_dates', 'work_position', 'work_employer', 'work_activities', 'education_dates', 'education_qualification', 'education_subjects', 'education_organization', 'language_name', 'language_understanding', 'language_speaking', 'language_writing' ); foreach ($array_fields as $field) { if (isset($_POST[$field])) { $sanitized_values = array_map('sanitize_text_field', $_POST[$field]); update_post_meta($resume_id, $field, $sanitized_values); } } // Return success message with download/payment options ob_start(); ?>

Your Europass Resume has been saved!

You can now download your resume in PDF format.

Download PDF (Free Preview)

Premium Download

Get the official Europass formatted PDF with watermark removed.

Please login or register to access your saved resumes.

post_author != $current_user->ID) { wp_die('Resume not found or access denied.'); } // Include TCPDF library require_once(plugin_dir_path(__FILE__) . 'tcpdf/tcpdf.php'); // Create new PDF document $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); // Set document information $pdf->SetCreator('Europass Resume Builder'); $pdf->SetAuthor(get_post_meta($resume_id, 'first_name', true) . ' ' . get_post_meta($resume_id, 'last_name', true)); $pdf->SetTitle('Europass CV'); $pdf->SetSubject('Curriculum Vitae'); // Add a page $pdf->AddPage(); // Europass header $pdf->SetFont('helvetica', 'B', 16); $pdf->Cell(0, 10, 'EUROPASS CURRICULUM VITAE', 0, 1, 'C'); $pdf->Ln(10); // Personal Information $pdf->SetFont('helvetica', 'B', 12); $pdf->Cell(0, 10, 'Personal Information', 0, 1); $pdf->SetFont('helvetica', '', 10); $personal_info = array( 'First Name' => get_post_meta($resume_id, 'first_name', true), 'Last Name' => get_post_meta($resume_id, 'last_name', true), 'Address' => get_post_meta($resume_id, 'address', true), 'Telephone' => get_post_meta($resume_id, 'phone', true), 'Email' => get_post_meta($resume_id, 'email', true), 'Nationality' => get_post_meta($resume_id, 'nationality', true) ); foreach ($personal_info as $label => $value) { if (!empty($value)) { $pdf->Cell(40, 7, $label . ':', 0, 0); $pdf->Cell(0, 7, $value, 0, 1); } } $pdf->Ln(10); // Work Experience $pdf->SetFont('helvetica', 'B', 12); $pdf->Cell(0, 10, 'Work Experience', 0, 1); $pdf->SetFont('helvetica', '', 10); $work_dates = get_post_meta($resume_id, 'work_dates', true); if (!empty($work_dates)) { for ($i = 0; $i < count($work_dates); $i++) { $pdf->SetFont('helvetica', 'B', 10); $pdf->Cell(0, 7, 'Period: ' . $work_dates[$i], 0, 1); $pdf->SetFont('helvetica', '', 10); $pdf->Cell(0, 7, 'Position: ' . get_post_meta($resume_id, 'work_position', true)[$i], 0, 1); $pdf->Cell(0, 7, 'Employer: ' . get_post_meta($resume_id, 'work_employer', true)[$i], 0, 1); $activities = get_post_meta($resume_id, 'work_activities', true)[$i]; $pdf->MultiCell(0, 7, 'Activities: ' . $activities, 0, 'L'); $pdf->Ln(5); } } else { $pdf->Cell(0, 7, 'No work experience provided.', 0, 1); } // Output PDF $pdf->Output('europass-cv-' . $resume_id . '.pdf', 'D'); exit; } // 6. Enqueue Styles and Scripts function enqueue_europass_assets() { wp_register_style('europass-form-css', plugins_url('css/europass-form.css', __FILE__)); wp_register_script('europass-form-js', plugins_url('js/europass-form.js', __FILE__), array('jquery'), '1.0', true); wp_enqueue_style('europass-form-css'); wp_enqueue_script('europass-form-js'); // Localize script for AJAX wp_localize_script('europass-form-js', 'europass_vars', array( 'ajax_url' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('europass_ajax_nonce') )); } add_action('wp_enqueue_scripts', 'enqueue_europass_assets'); // 7. Add CSS Styles function europass_form_styles() { echo ''; } add_action('wp_head', 'europass_form_styles'); // 8. Add JavaScript function europass_form_scripts() { echo ''; } add_action('wp_footer', 'europass_form_scripts');