• Resolved pawprintexample

    (@pawprintexample)


    Hello
    Im looking to have the apply to this job not print the little side box
    I instead want the button to open a prefilled email the candiate can manipulate and send.
    My issue is also getting certain fields to print in the subject and body such as an added job id and the title.

    I would like the permalink to be in the body :/ any help?

    https://wordpress.org/plugins/wp-job-manager/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    The apply button template can be modified: http://wordpress.org/support/topic/apply-for-job-button-1?replies=4

    Thread Starter pawprintexample

    (@pawprintexample)

    I did see this but unfortunately, it still prints the javascript box next to the Apply Button, I am looking for something that will auto open the email or something that will allow me to retrieve the email address, JOB ID (which I custom added) and the title of the job in the email

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Inside that template you can replace the input application_button with a link instead. e.g.

    <?php if ( $apply->type == 'url' ) : ?>
    				<a href="<?php echo $apply->url; ?>" class="button" target="_blank">Apply Online</a>
    			<?php else : ?>
    				<a href="mailto:<?php echo $apply->email . '?subject=' . rawurlencode( $apply->subject ); ?>" class="button" target="_blank">Send Resume by Email</a>
    			<?php endif; ?>

    removing the rest of the content.

    Thread Starter pawprintexample

    (@pawprintexample)

    ahh okay i see… I got it to show me the CSS I formatted and the button is now cosmetically correct in how it should look

    When I click it, it does open an email but it doesnt follow your format…
    I’m trying to get the echo to work now… I found the Job Manager Template in the plugin folder and where and what I would need to change (I think I have the right value (ex post_title) for the job ID…

    Just need this thing to auto fill and add a body and im done πŸ™‚

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Ok, to set subject and body you do it via the href:

    href="mailto:<?php echo $apply->email . '?subject=' . rawurlencode( $apply->subject ); ?>body=XXXX"

    The JOB ID would be $post->ID. Job title $post->post_title. Not sure which one you are looking for.

    Thread Starter pawprintexample

    (@pawprintexample)

    Oh wonderful!
    Thank you so much for your help!!

    The ID I’m speaking of is something I added manually, it’s a field my recruiter enters our ATS number so we can find the job easily πŸ™‚

    /* WP JOB MANAGER - JOB ID
    -------------------------------------------------------------- */
    add_filter( 'submit_job_form_fields', 'frontend_add_jobid_field' );
    function frontend_add_jobid_field( $fields ) {
        $fields['job']['job_jobid'] = array(
            'label'       => __( 'ATS Job ID Number', 'job_manager' ),
            'type'        => 'text',
            'required'    => true,
            'placeholder' => 'ATS Job ID Number (Avionte, CareerBuilder, Big Biller)',
            'priority'    => 8
        );
        return $fields;
    }
    
    add_action( 'job_manager_update_job_data', 'frontend_add_jobid_field_save', 10, 2 );
    function frontend_add_jobid_field_save( $job_id, $values ) {
        update_post_meta( $job_id, '_job_jobid', $values['job']['job_jobid'] );
    }
    
    add_filter( 'job_manager_job_listing_data_fields', 'admin_add_jobid_field' );
    function admin_add_jobid_field( $fields ) {
        $fields['_job_jobid'] = array(
            'label'       => __( 'ATS Job ID Number', 'job_manager' ),
            'type'        => 'text',
            'placeholder' => 'ATS Job ID Number (Avionte, CareerBuilder, Big Biller)',
            'description' => ''
        );
        return $fields;
    }
    Thread Starter pawprintexample

    (@pawprintexample)

    Also the code replacement for body seems to be body=XXXX under the subject…
    Im so sorry but im not quite sure how you have the $apply thing set up :/

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    $apply is passed to the template file. It contains the method and email/url depending on the job.

    Thread Starter pawprintexample

    (@pawprintexample)

    Thank you SO MUCH for your help!!
    I got the button to do what I wanted, I got the email to pop up, I have filled in the Subject fields and text –

    The body doesnt work though… Still stuck on the body…. :/

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Show me what you have?

    Thread Starter pawprintexample

    (@pawprintexample)

    <?php if ( $apply = get_the_job_application_method() ) :
    	wp_enqueue_script( 'wp-job-manager-job-application' );
    	?>
    
    <br/>
    
    	<div class="application">
    		<?php if ( $apply->type == 'email' ) : ?>
    				<a href="mailto:<?php echo $apply->email . '?subject=' . rawurlencode( $apply->subject ); ?>" class="jbapplybutton" target="_blank">Apply via Email!</a>
    			<?php endif; ?>
    
    		<div class="application_details">
    			<?php if ( $apply->type == 'email' ) : ?>
    				<a href="mailto:<?php echo $apply->email . '?subject=' . rawurlencode( $apply->subject ); ?>" class="jbapplybutton" target="_blank">Apply via Email!</a>
    			<?php endif; ?>
    		</div>
    	</div>
    
    <br/>
    
    <?php endif; ?>
    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    After:

    ?subject=' . rawurlencode( $apply->subject ); ?>

    Put

    &body=<?php echo get_post_meta( $post->ID, '_job_jobid', true ); ?>
    Thread Starter pawprintexample

    (@pawprintexample)

    Amazing, thank you so much, I really appreciate it!!

    It’s working perfectly!!
    For those that wish to do as I did

    <?php if ( $apply = get_the_job_application_method() ) :
    	wp_enqueue_script( 'wp-job-manager-job-application' );
    	?>
    
    <br/>
    
    	<div class="application">
    		<?php if ( $apply->type == 'email' ) : ?>
    				<a href="mailto:<?php echo $apply->email . '?subject=' . rawurlencode( $apply->subject ); ?> &body=Thank you!" class="jbapplybutton" target="_blank">Apply via Email!</a>
    			<?php endif; ?>
    
    		<div class="application_details">
    			<?php if ( $apply->type == 'email' ) : ?>
    				<a href="mailto:<?php echo $apply->email . '?subject=' . rawurlencode( $apply->subject ); ?>" class="jbapplybutton" target="_blank">Apply via Email!</a>
    			<?php endif; ?>
    		</div>
    	</div>
    
    <br/>
    
    <?php endif; ?>
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘editing apply now button’ is closed to new replies.