Display individual job post

By default, the field permalink will link directly to the RecMan page on recman.no. You can change this behaviour to display the content of individual job posts on your site.

There are two ways to show single job posts on your WordPress site - either through custom template or by using our built in shortcodes.

For theme builders we recommend shortcodes - for more control we recommend custom templates.

Step 1: Create a new page in WordPress.

Here you can either assign a custom template to display the job post, or insert shortcodes to render the page. Before you start building layout and content, start by adding something that can identify the page. For instance a string of "This is the RecMan job post page".

Do not link directly to this page. Content from the job post will not render unless it goes through the plugin.

Step 2 - Assign the page to the plugin settings

In order to get content to render, the page must be given the content of the job post. You must therefor define this in the RecMan WP Plugin settings.

Go to the Settings page in RecMan Jobs in your WordPress admin panel.

In the Individual job post page settings, activate Show individual job posts on Wordpress.

Select the page you have created in step 1.

If the page you select doesn't have a parent page, or you want to use another URI path, you can create a custom slug for individual job posts.

When you have completed the steps above, you can make use of the helper functions in the plugin to display the fields you like to include.

This is the way the plugin works:

  1. When you activate individual job posts, the job post permalink will link to the defined internal page instead of redirecting to recman.no. For instance, it the custom slug is set to "jobs" and the title of the jobpost is "Developer Wanted" the URL for the individual job post should look something like example.com/jobs/developer-wanted/.

  2. The plugin has defined a rewrite rule to try mapping /jobs/title to a given job post. If the job post is not found, it will redirect to the page you have defined as expired page redirect. If found, it will load the content of the job post and render the defined page.

Custom Page Template

To display a job post using custom template in Wordpress, you must first create a page template in Wordpress.

You don't need much details yet. You could easily just start with something like this:

<?php /* Template Name: Jobpost Page */ 

    get_header();
    
    echo 'Hello job post template: ' . get_jobpost('title');
    
    get_footer();

?>

Then assign this page template to a page in Wordpress.

Once, you see that job posts are linked internally, you can start designing:

Here is an example on how to use an individual job post template:

<?php /* Template Name: Individual Job Post Page */ 

    get_header(); 

    # show the job post title
    echo '<h1>' . get_jobpost('name') . '</h1>';
    
    echo get_jobpost('body');
    
    get_footer();
?>

Check out our starter template

Individual Job Post Template

Job post page using shortcode

Simply add the shortcode where you want the page to render its content. For instance, showing a title:

[job_post_field name="title"]

Last updated