Forums Forums Search & Filter Pro Getting the right URL/archive

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #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/clothing

    I 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
    #222835

    The 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
    #222839

    Many 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?

    Trevor
    #222914

    It might indeed. For now, with two post types being searched, you cannot avoid the query strings, sorry.

    Anonymous
    #222924

    Thank you again. I think I have a bit of a thing against query strings but hey, if they’re good enough for Amazon et al, then I guess they’re good enough for me (for now at least).

    I’ll look forward to seeing V3 when it comes out.

    Trevor
    #222928

    Thanks for your understanding. I will close this thread for now.

Viewing 6 posts - 1 through 6 (of 6 total)