Auto populate candidate_email meta key with current user’s email address

gistfile1.php<?php // !!! Don’t add the <?php above if you’re adding this to the end of your functions.php file !!! add_filter( ‘field_editor_auto_populate_candidate_email’, ‘auto_populate_candidate_email_field’ ); function auto_populate_candidate_email_field( $field_value ){ // If field value is already set (means it was pulled from user meta) then return that value // or if user is not logged in return […]

Remove specific products from Products 3rd Party Plugin dropdown in Submit Listing page

functions.phpadd_filter( ‘submit_job_form_fields’, ‘heynwa_custom_job_fields’, 999999999999 ); function heynwa_custom_job_fields( $fields ) { if ( isset( $fields[ ‘company’ ][ ‘products’ ] ) ){ if( isset( $fields[‘company’][‘products’][‘options’] ) && ! empty( $fields[‘company’][‘products’][‘options’] ) ){ $options = $fields[‘company’][‘products’][‘options’]; // To find out the specific ID of the "products" you can either add &debug to the end of the URL when […]

WordPress wp_get_object_terms convert $taxonomies SQL-formatted (comma-separated and quoted) to array

gistfile1.php// Because get_object_terms filter was not included until WP 4.2+ we have to use wp_get_object_terms for backwards compatibility. // Unfortunately this means taxonomies are passed like this: ( ‘resume_category’, ‘resume_skill’ ), so we have to remove the quotes, // and then use explode to convert it into an array of taxonomies. $tax_array = explode( ", […]

Example of adding custom PHP field output on Job List page

content-job_listing.php<?php global $post; ?> <li <?php job_listing_class(); ?> data-longitude="<?php echo esc_attr( $post->geolocation_lat ); ?>" data-latitude="<?php echo esc_attr( $post->geolocation_long ); ?>"> <a href="<?php the_job_permalink(); ?>"> <?php the_company_logo(); ?> <div class="position"> <!– This is the Job Title –> <h3><?php the_title(); ?></h3> <div class="company"> <?php the_company_name( ‘<strong>’, ‘</strong> ‘ ); ?> <?php the_company_tagline( ‘<span class="tagline">’, ‘</span>’ ); ?> […]

Remove field from education resume fields (this example removes qualifications)

gistfile1.php<?php add_filter( ‘resume_manager_resume_education_fields’, ‘my_custom_remove_education_field_admin’ ); add_filter( ‘submit_resume_form_fields’, ‘my_custom_remove_education_field_frontend’ ); function my_custom_remove_education_field_admin( $fields ){ unset( $fields[‘qualification’] ); return $fields; } function my_custom_remove_education_field_frontend( $fields ){ unset( $fields[‘resume_fields’][‘candidate_education’][‘fields’][‘qualification’] ); return $fields; }

Output twitter link from username

gistfile1.phtml<?php $twitter_username = get_custom_field(‘company_twitter’); if( ! empty( $twitter_username ) ) { $clean_twitter = sanitize_text_field( $twitter_username ); // Check for http: or https: in $clean_twitter if ( $clean_twitter && ! strstr( $clean_twitter, ‘http:’ ) && ! strstr( $clean_twitter, ‘https:’ ) ) { // Check if twitter.com is not in string (means they used username only) if( […]

Output company fields before job fields (custom template override)

job-submit.php<?php /** * Job Submission Form */ if ( ! defined( ‘ABSPATH’ ) ) exit; global $job_manager; ?> <form action="<?php echo esc_url( $action ); ?>" method="post" id="submit-job-form" class="job-manager-form" enctype="multipart/form-data"> <?php if ( apply_filters( ‘submit_job_form_show_signin’, true ) ) : ?> <?php get_job_manager_template( ‘account-signin.php’ ); ?> <?php endif; ?> <?php if ( job_manager_user_can_post_job() ) : ?> <!– […]