post_types URL parameter issue
-
This is mainly a note for the developer but thought I’d post it here in case it helps anyone else.
I’m running version 1.2.5 with WP 3.9 in a custom theme. There are four custom post types, with two global custom taxonomies. Each post type archive has the the filter shortcode in it, allowing users to filter on both custom taxonomies, but with no search box.
The issue is: if a user selects a combination of terms that produces no results, the natural instinct (for me anyway) is to choose the “select all” option in each of the taxonomy dropdowns to reset the search. Because the post type url parameter outputs
?post_types=
this takes the user to the index.php template (with no results) rather than the post type archive template, so they’re unable to just filter again.This might be by design, but it caused me some problems! So I’ve made an amendment to search-filter.php (naughty I know) so that if there’s only one post type being filtered it outputs the singular url parameter.
Hope this helps!
- The topic ‘post_types URL parameter issue’ is closed to new replies.