Template Functions Overview
For developers who want full control over the job listing design, the plugin provides a set of PHP template functions that follow WordPress conventions. If you’ve used have_posts() / the_post(), you’ll feel right at home.
When to Use Template Functions
Section titled “When to Use Template Functions”Use template functions when you need:
- Pixel-perfect custom designs
- Full control over HTML structure
- Custom logic around job data
- Integration into existing theme templates
Core Concept
Section titled “Core Concept”The plugin provides a loop pattern identical to the WordPress post loop:
<?php if (function_exists('have_jobposts') && have_jobposts()): ?>
<?php while (have_jobposts()): the_jobpost(); ?> <h3><?php the_jobpost('title'); ?></h3> <p><?php the_jobpost('excerpt'); ?></p> <?php endwhile; ?>
<?php else: ?> <p>No job posts available.</p><?php endif; ?>Key Functions at a Glance
Section titled “Key Functions at a Glance”| Function | Purpose |
|---|---|
have_jobposts() | Check if jobs exist / advance the loop |
the_jobpost($field) | Echo a field value |
get_jobpost($field) | Return a field value |
get_jobpost_count() | Get total job count |
have_jobpost_object($name) | Loop through nested data (contacts, etc.) |
get_jobpost_filters($field) | Get distinct values for filter UI |
get_jobpost_filter_url($key, $value) | Build filter toggle URL |
single_job_post_loaded() | Check if on a single job page |
job_post_map() | Get Google Maps embed HTML |
See the full Template Functions Reference for details on every function.
Guides
Section titled “Guides” The Job Post Loop How to loop through job posts and display them.
Displaying Fields How to get and display individual field values.
Filtering & Search Build custom filter and search UI with template functions.
Starter Templates Copy-paste ready templates for job listing and single job pages.