• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Exclude Child Category Links From Entry Meta

This code enables you to exclude or include all/specific child/sub categories from the entry meta in the entry footer of Genesis child themes.

By default, Genesis uses a shortcode named post_categories to display both parent and child category links in the entry footer. This shortcode uses the WordPress function get_the_category_list to display comma separated category links inline like this :

Once you add the code from this tutorial, child category links are removed like this :

Note : This code will work in any WordPress theme.

Here’s the demo video showing how it works :

Demo Video

Shows how the code removes all child categories assigned to a post.

Based on this question from a member of the Genesis community :

Does anyone know how to only show parent categories in the post meta rather than the parent and all the children?

Code Installation

There’s only 1 step :

From the download folder, copy & paste the PHP code from the functions.php file to the end of your child themes functions.php file.

Register or Login to access the download folder :

Register for full access

Related Tutorials

  • Exclude Specific Category Links From Post Meta In Genesis Entry Footer
  • Exclude Category Links From Genesis Post Categories Shortcode
  • Modify Genesis Post Categories Shortcode

Entry Meta Post Categories

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.