Blog – sMyles Plugins WordPress and WHMCS Plugins Thu, 06 Dec 2018 22:38:26 +0000 en-US hourly 1 WP Job Manager Field Editor 1.8.5 – Dynamic Taxonomy Child Dropdowns, Exclude Terms, Output CSV, and more! Sat, 03 Nov 2018 20:20:38 +0000 I’m happy to say that today is the release of version 1.8.5 of the WP Job Manager Field Editor plugin, which includes numerous highly requested features, bug fixes, enhancements, and more!  At the top of the list is the new Dynamic Taxonomy Child Dropdowns, which I have been working on for well over 4 months!  Dynamic Taxonomy Child Dropdowns allow you to customize any single or multiple select taxonomy fields, to dynamically show children terms, in a separate, completely customized, and dynamically shown dropdown!  Here’s what it looks like in action:

WP Job Manager Field Editor Dynamic Taxonomy Child Dropdowns Demo

WP Job Manager Field Editor Dynamic Taxonomy Child Dropdowns Demo

Dynamic Taxonomy Child Dropdowns

Please see the documentation page (which includes tutorial video) for Dynamic Taxonomy Child Dropdowns, here:

Dynamic Taxonomy Child Dropdowns

I appreciate everyone’s patience while I worked on getting this new feature released.  Unfortunately it was not an easy task, and ended up running into all kinds of issues with compatibility, and functionality … and instead of shipping a broken version of the plugin, I spent many sleepless nights testing, updating, and working on this latest release.

Template Updates

Both the term-select-field.php and term-multiselect-field.php templates have been updated in this release, if you’re using your own custom template overrides, please make sure you update them to match the new versions, to support the dynamic child dropdowns.

Previous versions of Field Editor did not include the term-select-field.php so please make sure you check any template overrides.

Other Updates

Included with this update are a few other features (a couple listed below), you can find the full list on the changelog.

Advanced Field Configuration Tab

Advanced Field Configuration Tab

Exclude Terms

Under the advanced tab you will now also see a text box where you can enter in TERM ID values to omit from showing in the dropdown.  To specify multiple terms, separate them with a comma.

Output CSV

For multiple field types you will also now see an “Output CSV” option.  Enable this to output multiple values as Comma Separated Values (instead of linebreak, or wrapping with value wrapper)



Final Thoughts

I hope you guys are as excited to use these new features, as I am to release them.  This release adds over 2,200 lines of new code base, and has been in the works for numerous months, testing, debugging, and working on compatibility.

I have tested standard functionality in Jobify, Listify, Listable, Listee, WorkScout, and all standard WP Job Manager templates without any issues.  If you do come across a problem, please be sure to open a support ticket and let me know, so I can work on a fix for it.

]]> 0
WP Job Manager Emails 2.7.0 – Email Preview, Nested/Conditional IF, PM and SQ plugin support, and more! Tue, 16 Oct 2018 17:02:02 +0000 It’s been a long time coming, but i’m happy to say that today is the release of version 2.7.0 of the WP Job Manager Emails plugin, which includes a TON of new features, including previewing emails directly from admin area, integration with WP Job Manager Screening Questions plugin, Astoundify’s Private Messages plugin, support for Multipart emails, nested and conditional IF shortcodes, and more! So let’s go ahead and dig right in to it


While this update contains a ton of new features and bug fixes, I can not stress enough that you should only upgrade when you have time available to test your site, and the emails after upgrading!

A lot of the code base that handled the HTML and plain text formatting had to be refactored (modified), and while doing so I found a handful of minor bugs, and other things along the way that had to be updated.   Things like additional line breaks being added when a shortcode did not have a value (resulting in large spacing between fields), or how shortcode values were pulled directly from meta instead of using a specific callback (when defined).

I have been testing this thoroughly for the past week (as well as a few beta testers), and believe there should not be any issues.  Either way, you should ALWAYS test this yourself, on your own site, after upgrading, to make sure emails are being sent and formatted the way you want/expect.

With that said, let’s go ahead and dig into some of the biggest new features available in this release:

Email Preview

WP Job Manager Emails Generate Preview Email Data

WP Job Manager Emails Generate Preview Email Data

A very highly requested feature that landed in this release, is the ability to generate previews of emails, on the fly, directly from the admin area!  The hardest part about integrating this new feature was the ability to select demo data to use, and then making sure preview works correctly with all the different integrations (Resumes, Applications, Reviews, Claim Listing, Alerts, Private Messages, Screening Questions, etc).

Users who upgrade to version 2.7.0 will notice the button on the top right of the screen that says Preview Email.  When clicking on this you will be prompted with a modal similar to the one on the left, to select example data to use for generating the email preview.  Depending on the hook for the email template, there may be more than one dropdown to select from.

Selecting Demo Data for Preview

Populate 5 random data sourcesYou have three options when it comes to selecting demo data to use for the email preview feature.

The first option is to just click the small dropdown icon on the right of the dropdown field, and it will automatically populate the dropdown with 5 random listings for you to choose from.

The second option is to type in a search term in the dropdown box, after the first 3 characters it will automatically start searching all of your available posts  (searching the Post/Listing Title) for your search term.

The third option is to type in id: followed by a post/listing ID, to return a specific post/listing ID (ie id:105)

If you have already searched for a listing and did not find what you want, and want to load random listings, or just need to reset the form, click the Reset button to reset the dropdowns back to their default state.

When you have selected demo data source to use, click on the Preview button to generate the email preview.

Email Previews

WP Job Manager Emails Generate Preview Email

WP Job Manager Emails Generate Preview Email

WP Job Manager Emails Generate Preview Email Plaintext

WP Job Manager Emails Generate Preview Email Plaintext

On the preview screen you will see the generated email, based on your selected data source.

If your email is configured as a multipart email (new feature as well, more details below), you will see two tabs, one for the HTML version, and one for the Plain Text version.

If you want to send this generated email to specific email address, you can click on the Send Email button and it will prompt you for an email address to send it to.

Please note that there are some hooks where the data for the email is actually obtained through PHP’s POST from a form, so there is a chance of some data not showing a value in the preview form.

It’s always a good idea to go through your site just like a normal user would, to trigger your emails, to make sure they are formatted and send the way you want/expect.

Multipart Emails

Multipart Email FormatThis release also adds a new format type to the email template, called multipart.  Multipart is a format used to send both HTML and Plain Text versions of emails, allowing the user’s email client to select which version to display.  You can enable multipart by selecting it from the format meta box.

Using this format allows the user’s email client to display the email based on their preferences, email client support, etc.  Email clients will only show one version of the email (it will not show HTML and Plain Text), and 95% of the time HTML will be shown, unless the email client does not support it, and then it will show the plain text version.


Custom multipart plaintextThere is also an option to select the Use custom plain text for multipart which will show a new metabox with a textarea when you check/enable it.  This allows you to specify a custom plaintext version to send with the multipart email (if you want), otherwise a stripped plain text version will be generated from the HTML version.

Shortcodes are supported just like normal in this textarea, and you do not need to use this unless you want a custom plaintext version to be sent.

WordPress and Multipart

The unfortunate thing about Multipart emails is that WordPress does not natively support sending multipart emails.  This is due to a couple things, a lack of people complaining about not having it, and PHPMailer which is the framework used by default in WordPress for sending multipart emails (core trac ticket).   Fortunately enough I was able to find a way to work around this, and force PHPMailer to send emails as multipart when required.

Email Plugins and Multipart

I have not fully tested the multipart handling with different plugins like Mailgun, Sendgrid, etc, but in theory they should work correctly as when I originally designed the multipart email integration, I built the emails generating my own boundaries, which is what is still used when sending an email as multipart … so as long as any plugins you use for sending emails, handle plugging (or filtering) wp_mail correctly, the headers and content should be formatted as required for multipart.  If you have issues with a 3rd party mail plugin (for sending emails, like SendGrid), please open a ticket and let me know.

IF Shortcodes

Included with the 2.7.0 release of this plugin is also a long overdue enhancement to the standard [if] shortcode from earlier releases.  I’ve been working on these features for a while now, and finally worked out the majority of the bugs and issues to be able to include it in this release.

All of the screenshots below are from the Help tab of your site (top right corner) when editing an email template


IF shortcode attributes and modifiers

IF shortcode attributes and modifiers

Attributes and modifiers addition to the [if] shortcode now make it possible to combine multiple statements into  one, as well as doing specific comparisons on values with numerous different comparison operators (see below).

You can negate a statement by prepending an exclamation (!) point before the meta key, which basically means “NOT”, using comparisons or any of the other different combinations possible.


You can combine statements together to evaluate that ALL expressions are true, using the AND operator
You can combine statements together to evaluate that ANY expressions are true, using the OR operator


Nested IF Statements

Nested IF Statements

Nested IF Statements

Unfortunately due to the way that WordPress parses shortcodes, it’s not possible to nest a shortcode inside of the same shortcode, and in previous versions you could not create if statements, inside of other if statements.

With this release nested if shortcodes are now available, [if_1][if_2][if_3][if_4][if_5][if_6][if_7][if_8]

So when you need to nest an if statement inside of another one, just increase the number on the shortcode, and you’re good to go!  Please note that your [else] and closing [if] must match the opening [if].  For example, this would be a correct nested [if] shortcode statement:

[if job_location]
    Has a job location!
    [if_2 job_title]
        No job title
   No job location, so i'm not showing the title

IF Comparison Operators

IF Shortcode Comparison Operators

IF Shortcode Comparison Operators

Comparison operators can be used to customize how the [if] shortcode will determine what to output.  Previous versions did not have this feature, and would only check if there was a value.

Now you can use the new comparison operators to check if a value contains a specific string, if it equals a specific string, starts (or ends) with a string, as well as arithmetic operators such as Less Than, Greater Than, and so on!

These arithmetic operators can also be used on multiple value (and taxonomy) field types to check the number of values in that field (explain more in detail below).

Like all other documentation, you can find examples, and more details in the Help tab while editing an email template.

IF for Taxonomies and Multiple Value fields

IF Shortcode Taxonomies and Multiple Value Field Types

IF Shortcode Taxonomies and Multiple Value Field Types

When a field you want to use an [if] shortcode on is a taxonomy or a multiple value field type (multiselect, file, etc), there is an easy way to check for a specific value, or even check all the values.

As mentioned above,  when using an arithmetic operator on these types of fields, it does not check the value itself, but checks the number/amount of values.

When you need to check for a specific value, or check all the values, you can use one of the available comparison operators (such as CONTAINS or EQUALS ), but instead of just entering one value, you can separate each value using a comma , (which is also known as CSV or comma separated values).


Single Post Status Action Hooks

Single Post Status Hooks

Single Post Status Hooks

A single post status action hook is one that is triggered anytime a listing is added/saved, and matches the single post status hook you selected.  The problem with this is that anytime a listing is saved/updated that hook will be triggered.

This is the reason the majority of hooks available in previous versions, required a specific previous status for the email to be triggered.

Single Post Status Transition Only

Single Post Status Transition Only

In earlier versions there were one or two of these available (mainly publish_POSTTYPE), but with this release you now have access to every single post status, both default and any custom ones you have added.

Along with having these available, there will now also show a warning area describing how single post status hooks work, and a checkbox you can check/enable to set how you want the single post hook to work.


When adding this feature to the plugin, I also rewrote a TON of the codebase for handling post status hooks, and instead of adding an action for each defined hook, we now use the transition post status hook to check the value, and send emails accordingly, which should result in a small speed improvement on your site.

Private Messages Plugin Integration

WP Private Messages Email Customization

WP Private Messages Email Customization

This release also includes integration with Astoundify’s Private Messages plugin, adding an entirely separate email section (under the main Private Messages menu) for customizing emails sent when new Private Messages are added.

Initially there is only one hook available for email templates (when a new private message is created), which supports all of the dynamic fields from the plugin, plus a few extra, including attachments, and more.

If there’s a specific shortcode  you would like to see included in the next release of the emails addon (for Private Messages), please open a ticket and let me know and I will look into adding it.

If you have an email template enabled in my plugin, it will automagically prevent the default one from the Private Messages plugin from sending.

WP Job Manager Screening Questions Integration

This release also include integration with the WP Job Manager screening questions addon plugin (free), which you can find on

The integration with this plugin adds a new shortcode available for use, [screening_questions] in email templates.  Due to the way the values for this plugin are saved (in their own MySQL table), this will output all of the screening questions for a listing.

Final Thoughts

While these new features/updates above are the most requested, there were a lot of other updates and minor bug fixes not mentioned here, which you can find all the details in the full changelog of the plugin.

A lot of these new features have been in the works for a while now, and I hope that you are as excited as I am to now have these available.

Please make sure that you test your site after upgrading to this version, to make sure you do not have any issues, and if you do, please open a support ticket and let me know.

]]> 1
WP Job Manager Packages – 1.2.0 Released – Give Packages and More! Mon, 09 Apr 2018 16:53:06 +0000 Today I am happy to release the 1.2.0 update to the WP Job Manager Packages addon plugin, which includes a long awaited “give” packages feature, and some bug fixes.  The give package feature now allows you to automatically give any visibility package, in two different situations.  The first one is when a new user registers, and the second is when another WooCommerce product is purchased.  Let’s go ahead and dig right into these new features.

Give Package on Registration

Give package to new user on registration based on user role example

Give package to new user on registration based on user role example

TLDR;You can automatically give a user a visibility package when they register on your site, without them having to go through purchase process, and is completely transparent to the user.  This can be configured to be given to any newly registered user, or you can specify only the custom roles for accounts that should be given the free package.

As of version 1.2.0 in WP Job Manager Packages, you can now create (or update existing packages), to be automatically given to newly registered users on your site.  This new feature was added after much generated feedback from the community surrounding new features they would like.

This feature essentially allows you to configure any existing (or new) Visibility Package, to be automatically given, for free, to a new user when they register on your site.  This completely eliminates having to have the end user go through the process of selecting a package, then checking out with the package, especially when it’s going to be a free package.

This also allows you to prevent the same user from purchasing the same free package multiple times, when you only want to give the package to them once, and then after that, they can go through the purchase process to purchase additional credits.

Give Package on Registration – User Roles

To prevent giving a free package to any user that registers on your site, you can specify the specific user roles that should only be given the package.  If this is left blank, it will be given to any user roles.  Multiple roles can be selected, but most of the time you will probably only select one role.  As an example, if you have created a “trial” resume visibility package, chances are you only want to give that visibility package to someone who registers on your site as an Employer

Give Package on Product Purchase

Give package on product purchase selection example

Give package on product purchase selection example

TLDR; – You can automatically give a user a visibility package when they purchase ANY other WooCommerce product, without them having to go through purchase process, and is completely transparent to the user.

Another very popular feature request was the ability to integrate the Visibility Packages, with plugins like WooCommerce Paid Listings, or Astoundify Listing Payments … to eliminate requiring users to purchase a package to post listings, and one to view listings … or maybe you want to give them a free basic visibility package with the purchase of a post listing package.

After much work to try and integrate the visibility packages with those addons, in the end I decided to completely open it up, as to not tie the configuration to only those specific products … so instead, I added this feature, but for any WooCommerce product.

That’s right!  You can now also configure Visibility Packages to be automatically given to any user who purchases another WooCommerce product.  Multiple products can be selected, but there are a few things to take note of regarding this:

Multiple Products Purchased

When multiple products are selected, think of this as an AND … not an OR … so for instance:

If you setup a visibility package to be given when the “Starter” AND “Pro” WooCommerce products are purchased.  If the user purchases either of those products, they will be automatically given the visibility package for free.

If they purchase both “Starter” and “Pro” products at the same time (in the same checkout), they will be given TWO visibility packages, one for each product purchased.

If you wanted to prevent this from happening, you could setup those products to only be purchased individually, but the user could just purchase the Starter package, complete checkout, and then purchase the Pro package and complete checkout, and that would result in being given 2 visibility packages.

Multiple Quantity of Products Purchased

By default, quantity of items purchased IS ignored … that means, if a user purchases a quantity of say, 5 Starter packages (in one checkout session), they will ONLY be given one visibility package.  With that said though, if the user purchases 1 Starter package, and completes the checkout 5 times, they will be given 5 visibility packages, one for each checkout.

You can change this default functionality by adding this line of code to your  child theme’s functions.php file, or using the Code Snippets plugin:

add_filter( 'job_manager_packages_wc_give_package_multiple_product_qty', '__return_true' );

Hiding Packages from Shop/Search

Hide WooCommerce Package from Cart/Shop/Search

Hide WooCommerce Package from Cart/Shop/Search

By default when you create new packages and publish them, they are visible in the cart or search on your site.  If you do not want users to be able to purchase these from your site, or find them in search (which i strongly recommend if you’re using the give features), you should change the Catalog Visibility to HIDDEN and then update the product (see screenshot above).  This will prevent this package/product from showing on any shop pages, in the search, etc.  The give features mentioned above, specifically have integration handling for allowing packages to be hidden.

Other Updates and Fixes

This 1.2.0 release also includes numerous bug fixes, and enhancements as well:

  • WorkScout Contact Details compatibility was added to fix issues with the custom template used by WorkScout
  • Database queries were optimized and code was added to make sure they are only ran when absolutely necessary
  • Fixed some PHP warnings about wpdb arguments
  • Fixed an issue where the Add to Cart button was not showing for subscription packages on the shop pages
  • And more, see full changelog here:
]]> 0
WP Job Manager Field Editor – Conditional Fields Beta Sat, 14 Oct 2017 02:04:23 +0000 As some of you may already know, in the latest release of the WP Job Manager Field Editor plugin, a very highly requested, and anticipated feature, conditional fields, has now been released in a beta phase.  Please make sure to report any issues or bugs you find, by submitting a support ticket.

This new feature has been a long time coming, and I know a lot of you have been waiting on this feature, and I do apologize for the amount of time it has taken to complete and get this feature released, and thank everyone for their patience with support delays and waiting on me to complete this.

The difficulties that arose with the conditional fields seemed to be one after another, once I was able to figure one thing out, something else came up.  Below I will go through some of the details regarding the Conditional Fields, how they work, the logic behind them, and the roadblocks I faced along the way in the process to get this released as a new feature.

For documentation and details about features, please see the Documentation Page for Conditional Fields:

Road to Releasing Conditional Fields

One of the hardest things about conditional fields, was designing and coming up with the method and how to handle conditional fields, both in the admin area for saving and setting them up, as well as on the frontend, and handling how actions are executed.

One of the biggest issues I ran into, was handling Default State on fields, and handling overlapping logic, and previous field states.

To explain, i’ll give you an example of how this works…

Say you have a group configuration setup to Hide a field, in this example, our logic is setup to hide company_logo if the company_name field equals “WordPress” … basically meaning, you don’t want anybody posting under the company name of WordPress to be able to upload a company logo.

The page loads, and initially the logic evaluates to true, so the company_logo field is shown.  A user enters in WordPress in the company_name field, and the logic then hides the company_logo field based on the logic you setup.  Now that the company_logo field is in a non-default state, whenever the company name is changed again, you want to return that field to the default state (to show it), right?

Well, let’s throw a wrench in this and make it a little more interesting.  Say you only want when a Company Name is entered as WordPress to show the company_logo field … you would then have to setup your logic as Hide company_logo … IF company_name IS NOT WordPress.

So after initially setting up the logic this way, I realized … the majority of logic I was setting up for testing … was all negated logic … IE I was setting all fields to hide, if a value does not equal this .. but when you think about it in your head, you’re going to be thinking … I want to SHOW this field, when this field is this value … welp .. there goes that idea, and the handling of default fields, and I had to come up with a better solution, as I knew at that moment, that way of thinking, was going to make it 10x harder for clients to setup their logic.

What I came up with instead, was that I needed to define logic the way a person is going to think about it in their head, and visually work out the logic.  This resulted in the currently handling, which will automagically set fields with a default state of hidden if they are setup in logic with show action.

To explain this a little further, I created a intro video tutorial you can watch below, describing how this works.  I also strongly recommend the full logic tutorial as well, which is below the intro video:


]]> 0
WP Job Manager Emails 2.1.0 Released! Custom post status, featured/unfeatured, [date] and [time] shortcodes, and more! Fri, 21 Apr 2017 21:47:27 +0000 Today, version 2.1.0 of the WP Job Manager Emails plugin was released, which includes a few bug fixes, some enhancements, and some awesome new features!  Some of the new features include full support for custom post statuses, featured and un-featured email hooks, pending payment to pending approval email hook, [date] and [time] shortcodes, and more!  Below i’ll go over all of these new features, bug fixes, etc!

New Features

Custom Post Statuses

As you can see in the image on the right, version 2.1.0 now includes full support for custom post statuses on Job, Application, and Resume post types.  These hooks are dynamically generated based on your custom post statuses and will all show up under the Custom Post Status Action Hooks in the hook dropdown.   This is a major revamp of the post status handling as everything is dynamically generated now, based on custom and default statuses.

WP Job Manager Emails Custom Post Status Hooks

WP Job Manager Emails Custom Post Status Hooks

So as an example, if you added a custom status to Applications, we will call it Rejected, and for keeping things simple in this example, we will say the only default statuses are Interviewed and Hired (default are actually new, interviewed, offer, hired, and archived). The plugin will automatically generate every possible hook between your custom status, any other custom statuses, and the default statuses.

So in our example from above, the new dynamically generated hooks would be rejected_to_hired, rejected_to_interviewed, hired_to_rejected, and interviewed_to_rejected.

Basically it’s customstatus_to_defaultstatus and defaultstatus_to_customstatus.  If you have additional custom statuses, it will also generate customstatus_to_customstatus.

Featured and Un-Featured Hooks

WP Job Manager Emails Featured Un-Featured Hooks

WP Job Manager Emails Featured Un-Featured Hooks

New hooks were added to send emails when a listing is updated and set as a Featured listing from Un-Featured, as well as Un-Featured to Featured listing.

In the image to the left, you can see there is also an available configuration option that will show when you select a featured or un-featured hook from the dropdown, that will allow you to configure to send the email when the listing is initially created.


[date] and [time] Shortcodes

WP Job Manager Emails [date] shortcode custom format example

WP Job Manager Emails [date] shortcode custom format example

Two new shortcodes were also added, [date] and [time], to allow you to output the date or time that the email is sent.  By default the WordPress Date and Time format (from Settings > General) i used to format the output, but you can also very easily customize this.

To customize the format of the output, all you need to do is use the attribute format and then specify a PHP date format to use.

An example of this would be, [date format=”Y-m-d”] which would output in this format: 2017-04-21

The [date] and [time] shortcodes are “technically” doing the same exact thing, I added them both to make it easier for beginners, as if you wanted to, you could include the time format characters in the [date] shortcode (or vice versa) and it would output as you configured it.

Other Features

pending_payment_to_pending email hook and templates

I’ve also added in this release the new pending_payment_to_pending email hook.  This is very useful if you want to send an email after payment has been made on a listing, but is still requiring approval.

Email templates were also added for this hook, and it can be used on both Jobs and Resumes.

New claim created via Admin Area email hook

What’s Next?!

Along with all the new features that have been added, i’ve also started the work on expanding the [if] shortcode, which will soon allow you to extensively customize your email templates.  You will be able to add conditionals (AND,OR), as well as false statements, and some custom function handling.

Soon you will be able to add [if] shortcodes in your email templates, like these (just examples):

// AND conditional logic
[if job_salary AND candidate_available][/if]

// OR conditional logic
[if candidate_available OR candidate_sendall][/if]

// Has "Some Text" in the title somewhere
[if job_title contains('Some Text')][/if]

// Equals exactly
[if job_location equals('Orlando, FL')][/if]

// Greater than or equal to
[if job_salary GTE('50,000')][/if]

The expanded [if] shortcode handling is not available in this latest release, but it will be included in an upcoming release.

I’ve also started handling of core emails as well, which includes the New Account, Lost Password, and a few others, which will be included in the next release as well 🙂


Bug Fixes

This release includes a few minor bug fixes in the last release.  Related to the Claim Listing addon plugin, the admin email was not being sent when a new claim was created, and the hooks were somewhat confusing to users.  This release fixes that issue, and adds a new hook new_claim_created_admin_area that will only be fired when a new claim is created via the Admin area (will not send when created from frontend of site).  The two other Claim Listing email hooks I added “Frontend” to clarify in their description. When you have an email template enabled for one of these emails (frontend ones), it will override and replace the default email sent by the plugin.

The framework used for the dropdowns in the admin area, has also been updated to patch a bug with Internet Explorer 11 where the dropdown would reopen by itself, as well as a bug where there were instances where you may be unable to select a hook from the dropdown.

Code was also added to dequeue the sloppy Bootstrap 3 Shortcodes plugin that enqueues it’s JavaScript on all pages, which caused conflict with my plugin’s dropdowns and javascript.

Fixed a few PHP warnings, issue where using single quotes in the subject line would show the encoded value (') instead of the single quote (it would still send the email with single quote).

There was also an issue with the [listing_url] shortcode which was fixed as well.

]]> 1
Field Editor 1.6.4 Release – New HTML5 Fields and WPML Fixes Sat, 10 Dec 2016 01:24:05 +0000 The maintenance release of WP Job Manager Field Editor 1.6.4 includes a few new features (HTML5 email, url, and tel input types), as well as a few minor bug patches, and the most important of this release, numerous patches and fixes for WPML compatibility, which I will go into detail about below:


Let’s start off with the most frustrating part of this release, dealing with WPML compatibility.  If you’re using WPML you may have recently noticed that when you save a field, it doesn’t actually update on the list table with the information you saved, which ended up being due to WPML returning a cached value, even though when you save a field, my plugin unregisters the old value, registers the new one, and then passes the new value through translation again to generate the updated list table.  To make matters even worse, the PHP documentation (which is almost non-existent in WPML code base) says

If a translation exists, it will return it. Otherwise, it will return the original string
  — which I found was clearly NOT true because it was returning the old value, even when there was no translation for the old or the new value!

Any normal developer would think, well i’m sure there’s some code they have that can quickly clear the cache and fix this issue … which was also not true!  Even the code provided by WPML didn’t work, and I ended up having to spend numerous hours to come up with my own hack to force it to clear the cache and fix the problem!

While debugging this issue I also found a problem where under the “context” in WPML, there were instances where option label/values were being duplicated in the string translation database table.  You may have noticed context that said something like Job Listing Fields Listing Fields … which was a duplicate of Job Listing Fields context.  This was due to a minor bug in my plugin that was looping through array values (option label/value), and when it was passed through the translation function, WPML was automatically adding it to the string translation database, causing duplicate entries for the same field.  Just make sure when you update to this latest release, that you have your translations set correctly in the Job Listing Fields context and not the Job Listing Fields Listing Fields context (same for Company and Resume).  Translations should have already been pulled from the correct context, but it’s always good to double check.

I have also removed the language filters from the field list table area that were automatically added by WPML, as they did not do anything and the fields are always going to show in whatever language you have the admin area configured in.

Other minor bug fixes

A few other minor bugs were fixed in this release as well, including an issue where HTML5 validation would fail if you were using taxonomy term-select field type, due to core WP Job Manager plugin setting the “none” value to -1, whereas it needs to be an empty string.

There was also an issue with taxonomy values not populating correctly whenever a user would duplicate a listing from their dashboard area, this has been fixed as well.

Job Type Multiple Setting

I have also now removed the “Enable multiple types for listings” setting from the core WP Job Manager setting page, as this will automatically be configured based on whatever field type you have configured the field as.  If you have not configured that field, it will still return the correct value to the core plugin.  This is the same way that the job_tags field works.

New HTML5 Field Types

In this release i’ve also added 3 new HTML5 field types, email, URL, and tel (telephone).   Let’s go through each new field type and why I added it, as well as what benefits it brings to your site.

  • email – the email field type is useful for HTML5 validation of email addresses.  Using this field type will prompt the user to input a correctly formatted (and valid) email address, if the field is required, or if they have entered a value that does not meet validation.
  • URL – just like the email type above, this will help to validate a URL with HTML5 and requires the protocol to be entered (http://, https://, etc) to meet validation.
  • tel – this field type is different from the others above, as there isn’t really any validation done on this field (unless you configure pattern in advanced tab), and will output and look just like a standard text input field.

Why should you use HTML5 input field types?

The main reason for me adding these field types, as well as the reason you should try and use them whenever possible, is mainly for your mobile clients/visitors.  The benefit of using these field types will help mobile devices to automatically show the best keyboard associated with that field type.  So for example with the email field type, it will set the @ and . keys on the keyboard for quick access.  Same with URL, it will set a .com and and forward slash as the quick access keys, making it easier, and quicker for your mobile visitors to fill out forms.  The tel field type will also show the numeric keyboard as default over the standard keyboard.

Now there are two Phone/Telephone field types?

You may have noticed that there is already a Phone field type included with the plugin.  The difference between the new HTML5 tel input type, and the existing phone input type, is that the Phone input type uses the International Telephone Input jQuery plugin on top of the HTML5 tel input, to provide a better user experience with a flag dropdown box, auto format, etc.

That’s it for this maintenance release, please let me know if there are any issues with the new features or the fixes that were included!

]]> 0
New Feature: Show/Hide specific fields based on selected package Thu, 29 Jan 2015 02:31:09 +0000 With the release of WP Job Manager Field Editor 1.2.4 comes a new feature for WooCommerce Paid Listings.  You can now configure fields that you only want to show on specific packages, or even on multiple packages.  A new tab has been added in the modal called Packages and with a little bit of configuration you can get your site up and running with completely different forms based on what package the user selects!

Find more information on the documentation page for Show/Hide specific fields based on selected package

]]> 0
New Feature: Automatically output custom fields on Job/Resume Listing Fri, 12 Sep 2014 20:28:46 +0000 With the release of WP Job Manager Field Editor version 1.1.8 a new feature has been included which now allows you to specify custom fields you want to automatically output on Job/Resume listings.  You can still use the integrated WidgetPHP or Shortcodes to output the custom fields, but it is now a lot easier to do so and includes a few nice features that allow you to customize your site as you want.  The plugin will only output and show whenever this field value is not blank, so if you have a field that is optional you do not have to worry about it showing the label with no value or any other invalid HTML.

WP Job Manager Field Editor New Modal

WP Job Manager Field Editor New Modal

New Modal Layout

When you update your version of the plugin to 1.1.8 you will see the modal for editing fields has a new look to it, and that is because it now includes what I like to call “tabs”, which allows a lot more room for customization, and adding new features.  This is also the start of laying the groundwork for the new “tab” section for options that will provide much easier method of adding dropdown options (basically a couple fields with an add more button).

The new modal will look similar to the image on the left.


WP Job Manager Field Editor Field Output Tab

WP Job Manager Field Editor Field Output Tab

Field Output Tab

As you can see on the left of the new modal layout there is a Field Output tab you can click on (will only show for custom fields), this will show another configuration area where you can specify if you want this custom field to automatically output on the Job/Resume listing with a few options which I will go over below.




WP Job Manager Field Editor Choose Output

WP Job Manager Field Editor Choose Output

Field Output Location

In the first dropdown you will find all the available locations you can choose to automatically output the field value at.  This will be the same for Job and Resumes and includes 4 different locations:

  • Top of Job Listing (before meta)
  • Bottom of Job Listing
  • Meta Start (inside UL list before Job Type)
  • Meta End (inside UL list after Date Posted)


To give you an understanding of these locations below is an example Job Listing with custom fields added in each one of the available locations:

WP Job Manager Field Editor Auto Output Areas

WP Job Manager Field Editor Auto Output Areas


Styling Custom Fields on Job/Resume Listing

Because WP Job Manager Field Editor does not include any styles (which 99% of the time causes problems), the plugin relies on your theme or adding custom styles to get everything to appear exactly how you would want it to.  Luckily I took this into consideration when adding this new features and as such there are standard wrapper and field divs that you can use to create your own CSS styles ( will probably add this as a feature in future release ).

Top/Bottom of Job Listing

Each custom field you set to automatically output on the job/resume listing will be wrapped in a

  with 1 class and 1 ID.

The value from the custom field will be inside another

  with 1 class and 1 ID.  The syntax used for the
  you can see below, the actual output will vary based on the field’s meta key, so using the syntax below 
  will be whatever that field’s meta key is.

Wrapper DIV:

<div id="jmfe-wrap-FIELD_META_KEY" class="jmfe-custom-field-wrap">

Field Value DIV:

<div id="jmfe-custom-FIELD_META_KEY" class="jmfe-custom-field">

As an example, if you were to set a custom field with a meta key of

  to output at the top of the job listing, this is the HTML the plugin will automatically generate:

<div id="jmfe-wrap-job_salary" class="jmfe-custom-field-wrap">
    <strong>Job Salary:</strong>
    <div id="jmfe-custom-job_salary" class="jmfe-custom-field">

You can also specify your own custom classes to add to the field value’s

  which I will explain further below.


<strong>Job Salary:</strong>
  is added only when Show Label is checked in the field configuration.

Meta Start/End Output

If you decide to pick to automatically output at meta start or meta end the ID and classes are exactly the same above except that instead of a

  for the wrapper it will be an
  wrapper.  Below is an example of the automatically generated HTML for the same field from above, except this example would be either at meta start or meta end:

<li id="jmfe-wrap-job_salary" class="jmfe-custom-field-wrap">
    <strong>Job Salary:</strong>
    <div id="jmfe-custom-job_salary" class="jmfe-custom-field">

This is because the meta locations are inside of the

<ul class="meta">
  wrapper and in order to show correctly they must be added as


Output As Options

WP Job Manager Field Editor Output As Options

WP Job Manager Field Editor Output As Options

As you can see in the image to the left there are currently 4 available output types (as of v1.1.8):


  • Standard Value Output (regular text)
  • Link
  • Image
  • oEmbed



Standard Value Output

This option is exactly as it sounds, it will output whatever the value is saved as.  This will probably be the most common output and if you are unsure I recommend using this option.



The link option will output the value inside a link HTML tag.  So in the example from above instead of the value being inside a

  it will be inside a link tag with the
  value being set to whatever the value of the field is.  This would be useful for upload field types, profile links, etc.

Selecting this option will also show another field Output Caption where you can specify the caption for the link.  If a caption is not specified the URL will be used instead.

The link field is also useful for showing buttons, all you need to do is make sure your theme has CSS styles for buttons and simply add your own custom class in the Output Classes  text box.  Common CSS classes for buttons are

  and so on.

As an example, if I have a

  custom field with Show Label checked, Output Caption set as “Employer Profile”, and “button” set in the Output Classes, this is the HTML that would be generated.  All links are set to open in a new window.  The
  comes from the value of the custom field for that job listing.

<div id="jmfe-wrap-job_profile" class="jmfe-custom-field-wrap">
    <strong>Job Profile:</strong>
    <a target="_blank" href="" id="jmfe-custom-job_profile" class="jmfe-custom-field button">
        Employer Profile


Choosing the image option will use an

  tag instead of
  from the examples above.  I would only recommend using this for file upload field types.  Reason being is if you set a custom field of of textbox and the user provides the URL to the image, chances are the job/resume listing will show the image box with an X if the image or URL doesn’t exist.  When the field type is an upload the file is on your server and will show correctly.


Using this option will attempt to generate the oembed HTML for things such as YouTube, SoundCloud, Vimeo, etc.  This would be useful for showing videos or other embeded items that you may have your custom field for.

Say you provide a field for users to enter the URL to a youtube video, and want that video to show on the job listing. This would be the option to choose to embed the YouTube video on that listing page.  There is a large number of sites that are supported, please see the WordPress Embeds page for more details.  The plugin will check if the URL provided in this field value is valid and will only output the embed HTML when the URL is valid.


Show Label

The show label checkbox gives you the option to have the Label from that field to show in the output.  If this field is checked the label will be shown with a colon after it.

]]> 0
New affiliate system, recommend sMyles plugins and get rewarded! Sun, 31 Aug 2014 22:57:57 +0000 That’s right, I was finally able to get the affiliate system setup and anybody can now register and start recommending sMyles plugins! Every person that uses your affiliate URL and makes a purchase you will earn 10% of what they pay!

So what are you waiting on? It’s free to sign up, and you have nothing to lose!

For more information about the Affiliate Program please click the button below.

Affiliate Program

]]> 0
Widget now included with WP Job Manager Field Editor Fri, 29 Aug 2014 23:11:32 +0000 As of version 1.1.5 there is now a widget integrated with the WP Job Manager Field Editor plugin. You can use this widget to output any custom or default field anywhere that supports widgets.

You can still use Shortcodes or PHP Code to output custom field values, but now you also have the option to use a widget that is included with the WP Job Manager Field Editor plugin!

With the new widget you can select the field from a dropdown list of all available fields, and also select how you want the field to output the value.

Current field output options include:

  • Standard Text
  • Link
  • Image
  • oEmbed ( Vimeo, YouTube, SoundCloud, etc )

Use the oEmbed if you want to output a YouTube video or something else that is supported by the standard WordPress oEmbed.

]]> 0