How To Remove Post Category Links Conditionally

The code in this tutorial shows you how to modify the category links in the entry footer using conditional tags.

The links are generated by the post categories shortcode.

In this example, the code removes the links from the post category names on the front page only while all other pages/posts are unchanged and linkable back to each category archive page.

Front page example showing link removed from post category :

Category Link Removed

Single post example showing default category name linked :

Category name linked

Demo Video #

Shows the category link on the front page removed and linked on all other pages including single posts.

Works in any Genesis child theme.

Installation Steps #

There’s only 1 step :

Copy the PHP code to the end of your child themes functions.php file.

Related Code Snippets

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.