• Resolved daisy-d

    (@daisy-d)


    I am using this code for the Apply for Job button:

    <?php if ( $apply = get_the_job_application_method() ) :
    
    	if ( $apply->type === 'url' ) {
    
    	    $application_href = $apply->url;
    
    	} elseif ( $apply->type === 'email' ) {
    
    	    $application_href = sprintf( 'mailto:%1$s%2$s', $apply->email, '?subject=' . rawurlencode( $apply->subject )  );
    
    	}
    
    	?>

    It was working but now if you add an email address when you click on apply for job the email address no longer appears in the To: field, instead showing multiple To: fields with various character in such as &#111 <> and I just can’t figure out why. Can anyone shed any light on this?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Davor

    (@davoraltman)

    Hi there,

    When I click on the Apply for job button on https://www.thehrdirector.com/job/commercial-director-permanent-london-wokingham-national-employee-awards/, a new tab opens which leads to mailto:online@thehrdirector.com?subject=Application%20via%20%22Commercial%20Director%22%20listing%20on%20https%3A%2F%2Fwww.thehrdirector.com.

    Where did you add the code you posted and can you provide me with more details on what you are trying to accomplish? The default behavior of WP Job Manager will display either a URL or the email address (depending on what the employer inserted) when you click on Apply for job button.

    Best,
    Davor

    Thread Starter daisy-d

    (@daisy-d)

    Hi Davor

    Thanks for your reply.

    I thought the default behaviour when the button was clicked was to toggle open the instructions for applying?

    What I am trying to accomplish is when the button is clicked, you are either taken to a URL or a mail client will open up with the appropriate email address (and subject) populated, depending on what the employer inserted.

    I followed this tutorial – https://wpjobmanager.com/document/customising-job-application-process/.

    The code posted is in job-applicatin.php which I have modified via my theme.

    As I mentioned previously, it was working perfectly and now it’s not and I can’t understand why as nothing seems to have changed.

    This is strange, I’ve just noticed something – when I was notified by email of your post it said this:

    
    a new tab opens which leads to mailto:online@thehrdirector.com?subject=Application%20via%20%22Commercial%20Director%22%20listing%20on%20https%3A%2F%2Fwww.thehrdirector.com.
    

    But in your post above it says this – which is actually correct:

    mailto:online@thehrdirector.com?subject=Application%20via%20%22Commercial%20Director%22%20listing%20on%20https%3A%2F%2Fwww.thehrdirector.com.

    Now, when I click on Apply for Job, my email client opens up and I see this:

    To: &#111 <>
    To: n&#108 <>
    To: i&#110 <>
    To: e&#64 <>
    To: thehrd&#105 <>
    To: r&#101 <>
    To: &#99 <>
    To: &#116 <>
    To: &#111 <>
    To: r.&#99 <>
    To: &#111 <>
    To: m <>
    Subject: Application via “Commercial Director” listing on https://www.thehrdirector.com

    Many thanks
    Michelle

    • This reply was modified 6 years, 10 months ago by daisy-d.
    Thread Starter daisy-d

    (@daisy-d)

    Hi Davor

    Thanks for your reply.

    I thought the default behaviour when the button was clicked was to toggle open the instructions for applying?

    What I am trying to accomplish is when the button is clicked, you are either taken to a URL or a mail client will open up with the appropriate email address (and subject) populated, depending on what the employer inserted.

    I followed this tutorial – https://wpjobmanager.com/document/customising-job-application-process/.

    The code posted is in job-application.php which I have modified via my theme.

    As I mentioned previously, it was working perfectly and now it’s not and I can’t understand why as nothing seems to have changed.

    This is strange, I’ve just noticed something – when I was notified by email of your post it said this:

    
    a new tab opens which leads to mailto:online@thehrdirector.com?subject=Application%20via%20%22Commercial%20Director%22%20listing%20on%20https%3A%2F%2Fwww.thehrdirector.com.
    

    But in your post above it says this – which is actually correct:

    mailto:online@thehrdirector.com?subject=Application%20via%20%22Commercial%20Director%22%20listing%20on%20https%3A%2F%2Fwww.thehrdirector.com.

    Now, when I click on Apply for Job, my email client opens up and I see this:

    To: &#111 <>
    To: n&#108 <>
    To: i&#110 <>
    To: e&#64 <>
    To: thehrd&#105 <>
    To: r&#101 <>
    To: &#99 <>
    To: &#116 <>
    To: &#111 <>
    To: r.&#99 <>
    To: &#111 <>
    To: m <>
    Subject: Application via “Commercial Director” listing on https://www.thehrdirector.com

    Many thanks
    Michelle

    Thread Starter daisy-d

    (@daisy-d)

    It’s not showing what I received in the email notification – but basically instead of showing mailto:online@thehrdirector.com?subject=Application%20via%20%22Commercial%20Director%22%20listing%20on%20https%3A%2F%2Fwww.thehrdirector.com

    it displayed the characters in the multiple To: fields.

    Hi there,

    I am using the snippet from here https://wpjobmanager.com/document/customising-job-application-process/

    And it’s working correctly. Please note that I am using Apple Mail client on MacOS.

    Image link: http://cld.wthms.co/0UKhAd

    Can you please let me know which mail client you’re using?

    Can you please take some screenshots for us as well? You can use these free apps/software:

    * https://www.awesomescreenshot.com/
    * https://monosnap.com/
    * http://imgur.com/upload – you can upload your screenshots on this free service

    Cheers,

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Apply for Job via Email’ is closed to new replies.