Answer the question
In order to leave comments, you need to log in
How to create a page for filter results by taxonomy terms in Wordpress?
Hello!
Can you please tell me how to create a separate page for filtering results by certain parameters?
For example, there is a post type "Writer" and its own taxonomy (nationality, works, etc.). When choosing from 10 writers, I want to choose Tolstoy and Dostoevsky, whose nationality is Russian and create a separate page for them site.com/pisateli/russkie/, and for the rest (Germans, French, English) - a page site.com/pisateli/zarubezhie
I read that you can make an sql query using the "posts_where" filter hook, but I still don't understand how to attach a beautiful URL to the results.
I will be glad to comments.
Answer the question
In order to leave comments, you need to log in
Regarding the url: create a page with the alias pisateli, and for this page 2 subpages russkie and zarubezhie. For these pages, already through different templates, or through meta entries, display the necessary writers. If you need to redirect to these pages from the search string (with filters), then it’s probably also possible to create such pages, in the admin panel display the ability to set which page for whom (russkie or zarubezhie), and already in the "posts_where" filter to determine which page redirect (pulling from the option set earlier)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question