Forums › Forums › Search & Filter Pro › Getting the right URL/archive
Tagged: V3
- This topic has 5 replies, 2 voices, and was last updated 5 years, 1 month ago by Trevor.
-
Anonymous(Private) October 3, 2019 at 10:43 am #222813
I have two custom post types ie. clothing and events.
I also have a postmeta field which stores the city (could change this to a taxonomy if necessary).Ideally I would like things to work as follows –
If user doesn’t choose a post type the url will be mysite/listings
If user does choose a post type the url will be mysite/listings/clothing
If user chooses a city (but no post type) url will be mysite/listings/london
If user chooses if user chooses both post type and city the url will be mysite/listings/london/clothingI note I can get the url mysite/listings/clothing if I only allow the search on the clothing post type but that doesn’t solve the problem if I want to offer a combined search
I guess essentially what I am saying is that I would like to get rid of the ?search-criteria part of the URL wherever practical.
Is this do-able or am I asking the impossible? 😉
With many thanks in advance.
Trevor(Private) October 3, 2019 at 2:04 pm #222835The URL structure that you describe could only be achieved in WordPress if there was one Post Type called
listings
.Even so, what you would then need is not possible with the current version of our plugin. I do not know if what you want would be possible with the next major release of our plugin (V3), although we do intend to offer the option to remove the query string, so it may be possible at that point.
Anonymous(Private) October 3, 2019 at 3:12 pm #222839Many thanks for your prompt reply Trevor.
I’d actually be happy to leave out the “listings” part of the URL if I could use a single filter to generate mysite/clothing or mysite/events (if a single post type was selected), and some other page if they were searching ALL listings.
Essentially some way of showing the “correct” archive page and avoiding query strings wherever possible. Maybe V3 will help address some of this?
-
AuthorPosts