GEO my WP Support

Use this forum for technical support and general questions related to GEO my WP plugin and its core add-ons only. For technical support and general questions related to any of the premium extensions please open a new premium support ticket.

[Not resolved]Searching using filters problem gmw_pt_tax_query and gmw_pt_search_query_args

Forums Support Searching using filters problem gmw_pt_tax_query and gmw_pt_search_query_args

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #54692
    derbra1513
    Member

    First of all I love your plugin! Its working great and Ive almost managed to launch my website but need to filter and search using the geolocation filter. I managed to find a thread that helped a bunch and it works great.

    The problem I am having is now I would like to filter the posts through custom taxonomies. I have 2 City, and Category. Ive managed to grab all the items that the user selects, put that into an array but when I try to pass it through a filter it doesn’t work. Any help would be appreciated. Ive attached the code I am using and the URL that is generated. I have also tried filtering this with the ‘gmw_pt_tax_query’ filter and the ‘gmw_pt_search_query_args’

    http://localhost:8888/buyandsell/?categories%5B0%5D=appliances&categories%5B1%5D=beautycosmetics&categories%5B2%5D=bikes&categories%5B3%5D=computers&filter=Filter%20Results

    #54694
    derbra1513
    Member

    Ok so I managed to get the queries to filter properly I was misusing the gmw_pt_tax_query filter. Now the problem I am having is that if the user filters enough on the form and gets to the point where qp_query can’t find any posts it breaks the search and the rest of the site load.

    `

    So right now everything is filtering fine but is there a condition I can add if no posts are found?

    #54698
    derbra1513
    Member

    Sorry for the broken code, I can’t seem to paste it without breaking the markup…

    #54702

    Hello Debra1513 and thank you for the feedback.

    Your script above seems to be OK and looks like it should work. However, I can’t see the live site ( the link above doesn’t work ) so I can’t see the issue.

    However, it could be the the URL is getting too long because of the categories and might be the cause for the error. But I can’t be sure.

    One thing you can try is to replace the category slug in the URL with the category ID, which will make the URL much shorter, and see if that works.

    If you can get the page live maybe I could help by looking at it.

    Sorry for the broken code, I can’t seem to paste it without breaking the markup…

    Wrapping the code within PRE tags ( instead of the code tags ) should solve the issue .

    #54714
    derbra1513
    Member

    Thanks for the reply!

    So Ive managed to get my multiple taxonomy filters to work. However If the user selects filters that results and 0 posts are found, My page breaks.

    I am just curious if there is a condition that I can use if no posts are queried I can send them to a no posts found page or something similar.

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

You must be logged in to reply to this topic.