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:
<?php
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;
}
https://www.isitwp.com/hide-posts-in-the-uncategorized-category/
Session expired
Please log in again. The login page will open in a new tab. After logging in you can close it and return to this page.