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 :
Here’s the demo video showing how it works :
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?
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 :
Leave a Reply
You must be logged in to post a comment.