Skip to content

Instantly share code, notes, and snippets.

@kish2011
Last active September 29, 2017 05:18
Show Gist options
  • Save kish2011/07e765c2538617d5e4fca0854e61c3db to your computer and use it in GitHub Desktop.
Save kish2011/07e765c2538617d5e4fca0854e61c3db to your computer and use it in GitHub Desktop.
count-jobs.js
/* add live job count on job search */
jQuery( document ).ready( function ( $ ) {
$('div.job_listings').on('updated_results', (function(_this) {
return function(event, results) {
$('#titlebar .count_jobs').html(results.post_count);
};
})(this));
});
@LiseaCa
Copy link

LiseaCa commented Sep 29, 2017

Is it possible to show job count on any pages or posts not only in job search. It will like show number of active jobs. I applied the step 1 and 2 but cannot set the step 3 as my theme has a lot of js files and I do not know which use.

Please advise.

Lisea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment