0

How can I display a list of tags within a category page?

So my URL would look something like this.

https://example.com/category/tag

Then it would display only posts from that category, and that tag on the page?

1 Answer 1

1

The best way to do that would be to create a custom page template, and make a custom loop that would only display the posts in you specific category and tag.

For example:

global $wp_query; $args = array( 'category__and' => 'category', 'tag__in' => 'post_tag', //Enter tag id for this field (not tah name) 'posts_per_page' => -1); //Gets all posts $posts = get_posts($args); foreach ($posts as $post) :  endforeach;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.