Add a job post feed
Easily incorporate job posts into your page template using a loop, similar to the WordPress post loop:
# Making sure the plugin is active and that job posts are available
if( function_exists('have_jobposts') && have_jobposts() ) :
# loop through each job posts
while( have_jobposts() ) : the_jobpost();
# Print the job post title
the_jobpost('title');
endwhile;
else :
echo "No job posts available.";
endif;
?>
Additional options
Limit number of jobs in feed
You can limit the number of job posts in the feed by adding a limit count (integer) to the have_jobpost
function. You only need this when checking if feed has posts.
<?php
# Check if there are any job posts available, limit the feed to # of posts.
if( function_exists('have_jobposts') && have_jobposts( 10 ) ) : :
....
Reset loop - If adding multple loops on your WordPress site.
Call the reset_jobpost_loop()
method before calling a new loop.
Read more on this page:
Check out our starter template
Job Post Feed TemplateLast updated