Custompress show variable on archive page

I want to show the custom field "Vestiging" on the jobs page (http://hoppenbrouwers-techniek.nl/vacatures/) for all the jobs on the page just like I show them on the specific page for a job (http://hoppenbrouwers-techniek.nl/vacatures/servicecoordinator-beveiligingsinstallaties/). There it works perfect, but on the jobs page unfortunately not

I'm embedding the code directly in the jb archive page template (no shortcodes)

I can imagine that it won't work because of the fact that this overview page doens't have a job ID, so the shortcode doesn't know which value to display. But I'm sure there must be a way to show it

  • Nithin

    Hi Marnick van den Brand,

    I tried to access your website to see how you have currently implemented these settings, but seems like I'm not able to access your website, I'm getting the following message:
    Je hebt geen toestemming om deze pagina te bekijken.

    Do you have Upfront Builder enabled? There is a similar issue, if you activate Upfront Builder network wide, the plugin works per site though. If that's the case, renaming the Upfront Builder plugin directory, under /wp-content/plugins/upfront-builder, will give access to your website.

    Please let us know once your website is working again, so that I could give a closer look at your current issue, and get that sorted asap.

    Kind Regards,
    NIthin

  • Rupok

    Hi Marnick van den Brand,

    Thanks for confirming. I tried to login with Support Access but it seems like Support Access is expired. Can you please revoke and grant us permission again so we can investigate further and try to resolve this?

    Now, to resolve the shortcode issue, can you please provide me couple of information? You said "I'm embedding the code directly in the jb archive page template (no shortcodes)", can you please tell us exactly what code did you embed? And did you create an "archive-jobs.php" template file in your theme folder and then embedded that code there? Or did you edit the "/wp-content/plugins/jobs-plus/app/views/job-archive/main.php" file? Which custom field are you trying to show? I mean, what is the key for your desired custom field which you are trying to show in jobs archive page?

    I tried to make CustomPress shortcodes work in an archive page and it's working fine. I added the following line of code in the loop where it's calling for posts in my test site:
    <?php echo get_post_meta(get_the_ID(), 'shortcode_key', TRUE); ?>
    You will get full details of get_post_meta() function from here: https://developer.wordpress.org/reference/functions/get_post_meta/

    I believe, this will help in understanding how you can make this work. If you find this complex, then please tell us the information I requested above and please grant us Support Access once again. We will be glad to help further and will try to resolve this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok