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

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.