D
D
Dmitry Molokanov2017-08-07 16:12:04
Taxonomy
Dmitry Molokanov, 2017-08-07 16:12:04

How to filter news by multiple parameters in WordPress?

Hello. The other day I started learning WordPress . I set the task to make a regular news site, and on the main page before the news there should be a filter in the form of three drop-down lists and one button. When clicked, the news is filtered by three parameters. I've looked all over the internet, but for a beginner, the information is too complicated. I tried to filter so that one news was in 3 categories, by taxonomy, but I didn’t really understand anything, since there is only php code everywhere, and how to display it on the page, as I want, is unknown. I created a taxonomy, added 2 elements, each with two entries, but when you switch, all entries are displayed. I tried through plugins, but nothing changes when adding them, I don’t know how to display them on the site.
In general, is there any good article for beginners on this subject or a ready-made solution? Preferably with all the steps, but not setting up the plugin, but how to display it is unknown. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
the5x, 2020-06-20
@the5x

https://wp-kama.ru/id_8218/taksonomii-v-wordpress.html
$houses = get_posts( array(
'posts_per_page' => 8,
'orderby' => 'rand',
'post_type' => 'houses' ,
'sale_price' => 'cheap',
'location' => 'voronej'
) );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question