Common changes with a few lines of code (Recipes)
Reign WP Job Manager Addon overviewPremiumGet Reign WP Job Manager Addon →
Also called: code snippets, functions.php recipes, child theme examples, job board code, WP Job Manager add-on examples
Each recipe below makes one change that site owners often ask for. Copy the snippet, paste it into your child theme, and save. Every snippet was tested with Reign WP Job Manager Addon 3.2.0, WP Job Manager, Reign 8.1.0 and the official Reign child theme.
Before you start
Section titled “Before you start”- Install and activate the Reign child theme. Changes in the parent theme are lost when Reign updates.
- Open the child theme’s
functions.php. Paste each snippet at the very end of the file. - Edit files through your host’s file manager or SFTP. If a snippet has a typo, the site can show an error. You can then fix the file the same way.
Try each change on a staging copy first if your site is busy.
The add-on fires no hooks of its own. The snippets below use the Reign theme’s job page filters, which draw the parts the add-on adds.
Rename the “Related jobs” heading
Section titled “Rename the “Related jobs” heading”A job page ends with up to three related jobs from the same job category. This snippet changes the heading to “More jobs like this”.
add_filter( 'reign_job_layout_sections', function ( $sections ) { if ( isset( $sections['related'] ) ) { $sections['related']['label'] = 'More jobs like this'; } return $sections;}, 20 );Keep the 20: the add-on adds the section at the default 10, and yours must run after it. To remove the section, use unset( $sections['related'] ); instead.
You’ll know it worked when a job that shares a category with other jobs shows “More jobs like this” above its related jobs. A job with no category, or the only job in its category, shows no related jobs.
Add a row to the job details
Section titled “Add a row to the job details”The Job details box on a job page lists the salary, career level and other fields. This snippet adds a “Listing closes” row with the date the listing expires.
add_filter( 'reign_job_detail_fields', function ( $fields, $post_id ) { $expires = get_post_meta( $post_id, '_job_expires', true ); if ( $expires ) { $fields['closes'] = array( 'label' => __( 'Listing closes', 'reign-child' ), 'value' => esc_html( wp_date( get_option( 'date_format' ), strtotime( $expires ) ) ), ); } return $fields;}, 10, 2 );Each row is a label and a value. The value prints as HTML, so escape it as the snippet does. Remove a row with unset(), for example unset( $fields['job_listing_industry'] );.
You’ll know it worked when a job with an expiry date shows “Listing closes” and the date in its Job details box.
Change one template: “Posted by” to “Listed by”
Section titled “Change one template: “Posted by” to “Listed by””Under the company card, a job page says “Posted by” and links to the poster’s profile. This override changes the words to “Listed by”. Use the same steps for job/related.php.
-
Copy
reign-wp-job-manager-addon/templates/job/poster.php. -
Paste it into your child theme at
reign-child-theme/reign-wp-job-manager-addon/job/poster.php. Create thereign-wp-job-manager-addonandjobfolders if they are missing. -
In your copy, find this line.
esc_html__( 'Posted by %s', 'reign-wp-job-manager-addon' ), -
Change it to this line.
esc_html__( 'Listed by %s', 'reign-child' ), -
Save the file.
You’ll know it worked when a job page reads “Listed by” before the poster’s name.
Keep the @version 3.2.0 line in your copy. After an add-on update, compare your copy with the new file if the add-on’s version number is higher. See Templates and child-theme overrides.
Good to know
Section titled “Good to know”My snippet broke the site. What do I do?
Section titled “My snippet broke the site. What do I do?”Open functions.php again through your host’s file manager or SFTP. Remove the snippet you just added and save. The site comes back straight away.
Can I use a code snippets plugin instead?
Section titled “Can I use a code snippets plugin instead?”Yes. The PHP snippets work the same in a snippets plugin. The template recipe needs the child theme, because it is a file.

