Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter David Mottershead

    (@motty)

    Thanks

    Regarding removing the application field.

    I’m inserting a Gravity form on the single jobs page. Then I’m pulling the email address of the post author into a hidden field. Then using this to send any job submissions to the post author’s email address.

    So I don’t believe I need the application field.

    Thread Starter David Mottershead

    (@motty)

    Thanks ever so much Mike.

    So my code is fine????

    Thanks for writing the plugin. It is truly one of the best.

    A default salary field would make it out of this world. Especially if it had the ability to set a currency, rate (fixed and range), plus time period (hour, month, year).

    Regards

    Thread Starter David Mottershead

    (@motty)

    Not sure if this helps but here is the full code I’ve added to functions:

    global $job_manager;
    
    remove_action( 'job_manager_application_details_email', array( $job_manager->post_types, 'application_details_email' ) );
    add_action( 'job_manager_application_details_email', 'my_job_application_form' );
    
    function my_job_application_form () {
    	$author_email_addy = get_the_author_meta( 'user_email' );
    	$author_first_name = get_the_author_meta ('first_name');
    	gravity_form($id_or_title='Apply For Job', $display_title=true, $display_description=true, $display_inactive=false, $field_values = array('author_email'=> $author_email_addy,'author_greeting'=>$author_first_name), $ajax=false);
    }
    
    add_filter( 'submit_job_form_fields', 'custom_submit_job_form_fields' );
    
    function custom_submit_job_form_fields( $fields ) {
    	unset( $fields ['company'] );
    	unset( $fields ['job']['job_location'] );
    	unset( $fields ['job']['application'] );
    	return $fields;
    }
    
    add_filter( 'submit_job_form_fields', 'frontend_add_new_fields' );
    
    function frontend_add_new_fields( $fields ) {
      $fields['job']['job_region'] = array(
        'label' => 'Job Region',
        'type' => 'select',
        'required' => true,
        'options' => array ( 0 => 'Choose a region', 'Bermuda' => 'Bermuda', 'Cayman Islands' => 'Cayman Islands', 'Other' => 'Other' ),
        'placeholder' => '',
        'priority' => 3
      );
      return $fields;
    }
    
    add_action( 'job_manager_update_job_data', 'frontend_add_region_field_save', 10, 2 );
    
    function frontend_add_region_field_save( $job_id, $values ) {
      update_post_meta( $job_id, '_job_region', $values['job']['job_region'] );
    }
    
    add_filter ('job_manager_job_listing_data_fields','admin_add_new_fields');
    
    function admin_add_new_fields ($fields) {
    	$fields['_job_region'] = array(
    		'label' => __( 'Job Region', 'job_manager' ),
    		'type' => 'select',
        	'options' => array ( 0 => 'Choose a region', 'Bermuda' => 'Bermuda', 'Cayman Islands' => 'Cayman Islands', 'Other' => 'Other' ),
    		'placeholder' => '',
    		'description' => ''
    	);
    	return $fields;
    }
    Thread Starter David Mottershead

    (@motty)

    Hi

    Thanks for looking into it. I’m definitely using 1.13. They are only warnings I believe so you won’t get any errors without WP Debug turned on. They are being reported by the WP Error Fix plugin when a job is submitted.

    WP Error Fix is reporting the following. The number in brackets is the line number.

    Undefined index: application
    /wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php(567) 2014-07-30 17:28:01 (1) new
    Undefined index: company
    /wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php(569) 2014-07-30 17:28:01 (1) new
    Undefined index: company
    /wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php(570) 2014-07-30 17:28:01 (1) new
    Undefined index: company
    /wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php(571) 2014-07-30 17:28:01 (1) new
    Undefined index: company
    /wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php(572) 2014-07-30 17:28:01 (1) new
    Undefined index: company
    /wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php(573) 2014-07-30 17:28:01 (1) new
    Undefined index: company
    /wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php(579) 2014-07-30 17:28:01 (1) new
    Undefined index: company
    /wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php(580) 2014-07-30 17:28:01 (1) new
    Undefined index: company
    /wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php(581) 2014-07-30 17:28:01 (1) new
    Undefined index: company
    /wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php(582) 2014-07-30 17:28:01 (1) new
    Undefined index: company
    /wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php(583) 2014-07-30 17:28:01 (1) new
    Undefined index: job_location
    /wp-content/plugins/wp-job-manager/includes/class-wp-job-manager-geocode.php(25) 2014-07-30 17:28:01 (1) new

    Thanks

    Fair enough but it’s not practical to regurgitate a 950 word article.

    Here’s my workflow for speeding up sites:

    [ link redacted own site ]

    Thread Starter David Mottershead

    (@motty)

    Thanks for the response.

    So the htaccess code is ok? It doesn’t conflict with anything in the plugin or anything else bad?

    Thread Starter David Mottershead

    (@motty)

    Ok. Didn’t realise that. I’ve done some reading as suggested and put it in theloop.php file as follows:

    <div class="entry-content"><!-- Article Start -->
    				<?php if (is_archive() or is_search() or (function_exists('is_tag') and is_tag())) {
    					the_excerpt();
    				} else {
    					the_content(__('Continue reading','k2_domain') . " '" . the_title('', '', false) . "'");
    				} ?>
    
    				<?php link_pages('<p><strong>'.__('Pages:','k2_domain').'</strong> ', '</p>', 'number'); ?>
    			</div> <!-- Article End --><!-- .entry-content -->

    Is this the best method? Seems to work.

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)