D
D
Damaks2015-09-10 21:02:44
CMS
Damaks, 2015-09-10 21:02:44

WordPress. Global filter for displaying site content by taxonomy?

Good afternoon.
A problem arose, the solution of which I did not find in the public domain, although the functionality is quite common. Maybe he just worded it wrong.
So. A custom hierarchical taxonomy "City" of the type "Country -> Region -> City" has been added to the site. You need to add a global filter to display posts on all pages, based on the user's selection of the "City" taxonomy. When surfing the site, the filter is not reset until the visitor himself changes the "City".
Displayed posts are filtered on the pages of standard and custom taxonomies, the search page (if possible). Any taxonomy value can act as a filter, not only the final value, i.e. You can choose not only the city, but also the region, for example.
Actually a question: how it to implement? As I understand it, there are two implementation options.
1) Use a ready-made plugin. None of the ones I've tried seem to work, as far as I can tell. If there are options, please write.
2) Write your bike or copy from a neighbor. Probably, you can modify the standard WordPress cycle or use other methods for displaying posts with your own modification.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
heartdevil, 2015-09-11
@heartdevil

Hello.
Well, in this case, it's not a bike. Rather, it's like calling the creation of a site on wordpress a bicycle. Such functionality is usually not posted as a plugin. Here you need to write your implementation. Make a filter, write the value to the session and check this session on all pages dependent on the filter and display the corresponding data on it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question