• Resolved freddredirl

    (@freddredirl)


    I have been using the Job Manager for quite a while and have about 30 categories. I have just noticed that the jobs are no longer appearing in the categories as they all have a count of ZERO. But when I click on the Zero I can see the jobs listed with the categories.

    Any ideas on this one?

    Cheers, J.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Cena (a11n)

    (@cena)

    Hi @freddredirl ,

    Can you send us a link to where we can see this in action?

    Best,

    Cena

    Thread Starter freddredirl

    (@freddredirl)

    More info – I have since discovered that there was a job import script created to import the jobs from a CRM. It was working fine until just recently but now the script imports the jobs but the jobs dont seem to show up in the category count as they are ZEro. But if I click on the ZERO I can see the jobs ok within the category. The workaround is to manually assign a job to a user, hit Save and then the count works. I am wondering if you can share any info that might help us fix the code?

    Plugin Author Mikey (a11n)

    (@mikeyarce)

    Hey @freddredirl – it sounds like the problem is that when the import script happens, it doesn’t recalculate the term counts. I would suggest using a function like wp_update_term_count in your script so that the term counts are updated.

    When you manually assign a job to a user, what’s happening is that the job listing is being saved, which triggers a term count, which updates the term count number for the job.

    Hope this helps!

    Thread Starter freddredirl

    (@freddredirl)

    Hi – this worked! Just one more query

    When updating the list of jobs now, after the script runs if there are any jobs deleted they seem to persist in the cache until a job is updated manually which then resets the cache in the wp_options database table. Is it safe to delete these rows when the script runs, or if there is another function used to clear the cached posts from the wp_options table.

    Plugin Author Mikey (a11n)

    (@mikeyarce)

    @freddredirl you can try using wp_cache_flush to clear the object cache.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Category incorrectly displaying zero jobs’ is closed to new replies.