K
K
Konstantin2018-02-27 11:55:42
WordPress
Konstantin, 2018-02-27 11:55:42

How to restore display by tags after custom post cycles?

I made a custom cycle for displaying posts from the desired category on the main page using wp_query . Then I noticed that when you click on the label at the bottom of the post, WordPress displays all the posts of the category, and not specifically this label. The same if using query_posts. When I put a normal cycle, everything is fine.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin, 2018-03-01
Kapelnikov @Kapelnikov

Understood. Everything turned out to be so simple that it was already embarrassing. You just had to either create a separate cycle in the home.php template for the main page, or a separate cycle in the tag.php template to display posts by tags. Otherwise, everything referred to index.php, where there is a cycle with forcing to display posts of one category.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question