Updated on October 04, 2019

Looking for a way to display comma-separated linked categories for posts output by Oxygen‘s Easy Posts component?

Just add the following in the Template PHP wherever you want to show the categories:

<?php echo '<div class="oxy-post-categories">Categories: ' . do_shortcode( "[oxygen data='terms' taxonomy='category' separator=', ']" ) . '</div>'; ?>

To NOT show the above when a post has not been assigned manually to any category i.e., it has the default Uncategorized category, change the above to:

if ( ! in_category( 1 ) ) {
	echo '<div class="oxy-post-categories">Categories: ' . do_shortcode( "[oxygen data='terms' taxonomy='category' separator=', ']" ) . '</div>';

You may want to also add CSS similar to the following to add some space above/below the categories:

.oxy-post-categories {
  margin-top: 20px;



Need help implementing a tutorial in your site or want to hire me for custom work?


Find the article helpful and wish to donate?



For adding code blocks wrap the code in three backticks. Markdown should work.
Provide a URL of your site/webpage if something is not working.

8 comments on “How to show categories in Oxygen’s Easy Posts”

      1. I used Woocommerce -> Oxygen Products List to generate the Shop product list. From there it is not possible to modify the PHP template, how should it be done in this case?

  1. Thanks Sridhar! I’m wondering how I can change the text color of the categories, it seems to only show up as a blue link even when I change the CSS accordingly… I’m trying to display it as a button instead of a link and I want to change the text color to stylize it. Any advice would help!

        1. Actually, now that I take a look, all the categories are displaying the same as the first one no matter which one it actually is… hmmm.

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: