Special Offer: Buy All 48 Premium WordPress Themes for Just $74.99. Learn more

Hide Categories and Tags in Single Post Pages

Categories and Tags

In some cases you may want to hide Categories and Tags in single post pages, but keep them in posts listing. It will require a small code change. Here are all of the necessary steps:

  1. Login to your Admin Panel
  2. Navigate to Left Menu -> Appearance -> Editor
  3. Open yourtheme/content.php
  4. FindĀ <?php if ( has_category() ) : ?>
    and Replace it with:
    <?php if ( has_category() && !is_single() ) : ?>
  5. FindĀ <?php if ( has_tag() ) : ?>
    and Replace it with:
    <?php if ( has_tag() && !is_single() ) : ?>
  6. Save Changes

 

About the Author

Tihomir Ivanov is a WordPress and Salesforce Commerce Cloud (SFCC) developer, founder of tishonator.com, a fan of Linux and Open Source, Minimalism (in Design and Life), Sci-fi, Fantasy, Classic and History books :)

Leave a Reply