Embeddable Job Widget

With the Embeddable Job Widget plugin, you can show a form on your site that users can generate some embed code with. This embed code can show listings from your site wherever they use the code.

Installation

To install this plugin, please refer to the guide here: https://wordpress.org/support/article/managing-plugins/#installing-plugins

Once activated you’ll be able to use the form shortcode.

Setting up the Embed Code Generation Shortcode

The embed code generation form can be added to a page using a shortcode. To set this up:

  1. Create a page in WordPress admin – you can name this whatever you want.
  2. Switch from the visual editor to the text editor and add the following shortcode to the page content: [embeddable_job_widget_generator]
  3. Save the page.

The page will show this on the frontend:

2015-01-01 at 14.14
The embed code generation form

Using the Embed Code Generator

The embed code generation form contains several options for the widget it generates:

  • Keyword which searches for jobs that match the keywords provided.
  • Location which searches for jobs within a certain location.
  • Display Count which controls how many jobs get displayed.
  • Show Pagination which shows a next/previous link in the widget to show more results.
  • Categories to limit the jobs which get displayed.
  • Job Type which limit the jobs that get displayed.

Once you’ve chosen your desired options for the widget, click ‘Get Widget Embed Code‘. This will reveal 2 sections; a preview of your widget, and the code you can paste on a website to display the jobs:

Embed Preview
Embed Preview

The code can be pasted into any website (it doesn’t have to be a WordPress site) and your job listings will be displayed.

Advanced: Customising the Widget Templates

There are 4 template files included with this plugin:

  • content-embeddable-widget-job_listing.php – Controls the output of each job listing.
  • embed-code-css.php – Controls the CSS contained in the embed.
  • embed-code.php – Controls the main embed code (script, wrapper and heading)
  • form-embed-code-generator.php – Contains the embed code form.

To customise these template files e.g. if you want to edit the styling, copy the file from wp-content/plugins/wp-job-manager-embeddable-job-widget/templates/ into yourtheme/wp-job-manager-embeddable-job-widget/.

The version you copy into your theme folder will take priority.

Troubleshooting

If no jobs show up when you embed the generated code, please check the following:

  • Both sites (the one where the Embeddable Job Widget is installed and the one where the code is embedded) need to use the same protocol. Both sites need to use either HTTP or HTTPS.
  • Check if any security plugins are preventing access to the jobs script page at `https://your-site-url.com/?embed=wp_job_manager_widget`.
  • Check the browser console for any JavaScript errors.