• Resolved rahepler

    (@rahepler)


    I have a site that is using wp-job-manager plugin. In the child theme I have the job-fitlers.php file and the search bar is working fine. The issue is I want to add another form field to order the results on the page.

    The page specifically calls the [jobs] shortcode to display jobs on the page, and the job-filters.php handles the searching of keywords, titles, and location. However, when I add a div and form element for the orderby and then add that _$GET to pull it in in the output-jobs function the results are not filtered.

    Inspecting the network traffic I see the form capturing the input correctly, but it’s not being applied to the output-jobs function and ultimately the page rendered by [jobs].

    What can I do to implement a simple sort of the jobs on title and date?

Viewing 1 replies (of 1 total)
  • Hello,

    I’d check if there is only one orderby sent in the request, or if there is another field sending a competing value.

    The ordering itself is the domain of the get_job_listings function, you might need to tweak the query there. Normally orderby can take whatever WP_Query accepts under the hood. There is a get_job_listings_query_args filter to modify the query args after they are processed.

    Note that the shortcode’s featured_first attribute also interferes with the ordering.

Viewing 1 replies (of 1 total)

The topic ‘job-filters orderby code’ is closed to new replies.