How Do I Show Only One Category in a WordPress Post?

There are a few ways to show only one category in a WordPress post.

1. Use the category shortcode.

The easiest way to show only one category in a WordPress post is to use the category shortcode. To do this, simply add the following code to your post:

[cat]

This will show all of the posts in the category “cat”. You can also use the [cat2] and [cat3] shortcodes to show additional categories within the same post.

2. Use the taxonomy term shortcode.

You can also show only one category by using the taxonomy term shortcode. To do this, add the following code to your post:

[term_name]

This will show all of the posts in the taxonomy term “term_name”. You can also use the [term_name2] and [term_name3] shortcodes to show additional terms within the same post.

3. Use thecat category filter.

You can also show only one category by using thecat category filter. To do this, add the following code to your post:

[cat1]

This will show all of the posts in the category “cat1”. You can also use the [cat2] and [cat3] filters to show additional categories within the same post.

4. Use the category archive filter.

You can also show only one category by using thecategory archive filter. To do this, add the following code to your post:

This will show all of the posts in the category “cat1” from the archive.

5. Use the category slug filter.

You can also show only one category by using thecategory slug filter. To do this, add the following code to your post:

[cat slug]

This will show all of the posts in the category with the slug “cat slug”.

Conclusion

There are a few ways to show only one category in a WordPress post. The easiest way to do this is to use the category shortcode.

You can also use the taxonomy term shortcode, the category archive filter, or the category slug filter.