Find out how to hide the metadata that appears at the beginning of a Custom Post Type (CPT) in Genesis Framework by code.
When you do not need to display the date, author and number of comments under the title of a CPT in a Genesis child theme, you can easily hide them with the following snippet:
Code to suppress the metadata at the beginning of a CPT
Add this fragment at the end of the functions.php file:
To see this and another 1097 code snippets of this website, login or subscribe here.
It’s as simple as that.
In this case, the metadata from Custom Post Type called “portfolio” will be removed. Change that text to the CPT you are interested in (“products”, “events“… ).
If the CPT has its own template (for example: single-portfolio.php), another option is that you insert the following code in it, just before genesis();
To see this and another 1097 code snippets of this website, login or subscribe here.
Conclusions
Now you know how to remove the metadata that appears under the header and title of a CPT in Genesis child themes.
If you have any question, please leave it in the comments. And if you want to give me a suggestion for future snippets, please send it through the contact form.
Benefits of being a subscriber. 🙂