Learn in this tutorial how to hide the post_content or content in a Custom Post Type (CPT) in Genesis Framework by code.
If you are using a CPT that only uses custom fields to fill in and display the CPT information, you don’t need the default content (
post_content) to be loaded.
Do you want to remove it?
You can do this easily with a Genesis hook (specifically,
genesis_entry_content) and WordPress conditional tags.
Here we go.
Snippet to remove CPT content in Genesis
Add this fragment to the end of the functions.php file:
There you go.
With the previous code, the content will no longer be displayed in the CPT portfolio entries, but I invite you to modify it to the one you want.
Now you know how to erase the post_content of a CPT in any Genesis child theme.
Any questions? I read you in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉