Support » Plugin: WP Job Manager » Slug links for job-category not working

  • Resolved Bunny Blake


    I’ve set up job categories in my app and everything seems to work great except I can’t get slug links for job-category to redirect properly.

    I have a category “Photographer” with slug “photographer” and several jobs in that category. But if I go to “mysite/wordpress/job-category/photographer” it returns “No posts found.”

    I *can* go to a specific job page with “mysite/wordpress/job/[jobID]”, so that permalink works fine, but I can’t get an URL to show me a [jobs] report within a specific category.

    I’ve also played around with some of the code snippets and tried creating a link like “mysite/wordpress/?taxonomy=job_listing_category&term=photographer” but that just shows the homepage with all categories.

    Any ideas? I feel like I’m probably missing something simple but I can’t figure out what. I haven’t changed anything in Settings -> Permalinks and it still shows the grey default “job-category” there.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Okay I figured it out partway, that I had to enable full theme support in functions.php, and then go to the permalinks page to save. Doing this makes the job category slug links work okay, although the output it returns is showing the full single job listing for each entry, which is not quite what I want.

    The end result I want is to build a link which will call the [jobs] shortcode with parameters, like [jobs categories=”photographer”]. Is there an easy/recommended way to do this?

    Okay I figured it out, the answer was in the “creating a custom job search form” tutorial. I just need to construct an URL to call the main jobs page with a GET request like ?search_category=19.

    The description of the [jobs] shortcode does say “If the URL of the page contains a query string and location or keywords is set, the values in the query string will populate the location and keywords fields instead of the above options,” which I totally overlooked. Maybe that bit of the documentation could be expanded a bit? It talks about prepopulating the fields, but doesn’t mention you can filter the page e.g. on job-category.

    i have the same problem, can you tell me how you added the job search form template?

    Hi, this is the code I used to build a clickable list of categories with stub links. This goes in a sidebar.php custom designed for the theme.

    foreach ( get_job_listing_categories() as $cat ) : 
      echo '<li><a href="' . $prefix . '/jobs/?search_category= ' . esc_attr( $cat->term_id ) . '"/>' . $cat->name . '</a> (' . $cat->count . ')';
     endforeach; ?>

    If you want to search for text in the job listings you can just send a GET request to the page with the [jobs] shortcode, like “mainjobs.php?search_keywords=”blahblah”.

    Does that answer your question?

    • This reply was modified 3 months, 3 weeks ago by  Bunny Blake.
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.