• Resolved ralbrightii

    (@ralbrightii)


    I am trying to change the email subject for the “Apply for Job” button. Currently, when you have it set for email address only, the button, pops up a small box that states “To apply for this job email your details to [requesters_email]”
    With [requester’s email] is a link to:
    mailto:requesters email?subject=Application%20via%20Photos%20with%20Santa%20listing%20on%20https%3A%2F%2Fnorpac.albrighttechsolutions.com

    I am trying to change the subject line of this link, but in the source code for this page I only see:
    <?php printf( wp_kses_post( __( 'To apply for this job <strong>email your details to</strong> <a class="job_application_email" href="mailto:%1$s%2$s">%1$s</a>', 'wp-job-manager' ) ), esc_html( $apply->email ), '?subject=' . rawurlencode( $apply->subject ) ); ?></p>

    My guess is %2$s contains the subject, is that correct? Where does it pull this data from?

    (this is on a test domain currently)

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi!

    What exactly are you trying to change the subject to? In any case, you’d need to edit this:

    rawurlencode( $apply->subject )

    https://github.com/Automattic/WP-Job-Manager/blob/d22bbfb04e57f40a1c20c447597f58a33825c45e/templates/job-application-email.php#L18

    Make sure you override the template instead of editing it directly:

    https://wpjobmanager.com/document/template-overrides/

    Plugin Contributor Richard Archambault

    (@richardmtl)

    I’m marking this thread as Resolved as it’s been more than a month since the last reply. If you still need help, please do reply again and mark the thread as Unresolved!

    Thread Starter ralbrightii

    (@ralbrightii)

    Sorry, life got a bit busy.

    Currently the subject line in my case shows as:
    “Application via Santa Visit listing on [website]”

    I would like to change that to:
    “Santa Request from [website]”

    I am not sure how to change that dynamically. I guess I could change it as a static subject line there and pre-fill in the website. What exactly would I change?

    Thread Starter ralbrightii

    (@ralbrightii)

    Okay, I answered my own question…. For future notes and others:

    I changed the line from:
    <?php printf( wp_kses_post( __( ‘To apply for this job email your details to %1$s‘, ‘wp-job-manager’ ) ), esc_html( $apply->email ), ‘?subject=’ . rawurlencode( $apply->subject ) ); ?></p>

    to:
    <p><?php printf( wp_kses_post( __( ‘To apply for this job email your details to %1$s‘, ‘wp-job-manager’ ) ), esc_html( $apply->email ), ‘?subject=Santa Request from https://www.norpac-santas.org&#8217; ); ?></p>

    Thread Starter ralbrightii

    (@ralbrightii)

    Well, so I updated the file in the plugin… not in the override folder.

    How do I update that, specifically WHAT folder do I do that in. The theme I am using is called snowfall (folder is also the same)

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi!

    Glad you were able to figure it out!

    However, since you updated the file in the plugin itself, the changes will be overwritten if you update the plugin.

    For exact instructions on how to do it “properly”, see here:

    https://wpjobmanager.com/document/template-overrides/

    In your case, you’d want the file to be here:

    wp-content/themes/YOURTHEME/job_manager/job-application-email.php

    I’ll mark this thread as resolved again, but do open it up again if you still need help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘custom email apply link’ is closed to new replies.