Answer the question
In order to leave comments, you need to log in
How to display subcategories with posts from a specific category?
Good evening.
There is a task. On the main page, display subheadings with entries from a certain heading, I did not find any good articles on my "problem".
It should end up going somewhere like this.
That is, it should be implemented - the output of the miniature of the sub-heading, the name of the sub-heading, and the titles of the entries of these sub-headings.
Your help is very much needed.
Answer the question
In order to leave comments, you need to log in
Faced the same problem. I solved it, posted it here on the forum:
www.cyberforum.ru/wordpress/thread1545463.html#pos...
I have 3 categories (parents) for each made a page, and on each page displayed the necessary (child subcategories) using id.
get_categories and 'parent' => 'id'
This site wp-kama.ru/functions has many functions and their description with examples.
Install the plugin https://wordpress.org/plugins/categories-images/ (this is for adding images of categories (headings))
You will display its name by the id of the heading.
Then you take the category id and get all the entries in this category, and display them as a list.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question