There’s at least 3 ways you can remove the post info or what is now called in StudioPress HTML 5 child themes, the entry meta in the entry header, from single custom post types.
- Custom Function – You can use PHP code in your functions file
- Remove Action – Add one line of PHP code to your single cpt file
- Or CSS code to hide the post info
1. Custom Function
Copy ALL the code from the view raw link and paste it at the end of your child themes functions.php file using a text editor like Notepad++
Replace portfolio in the code with the name of your custom post type.
2. Remove Action
Add this line of code to your single_cpt.php file.
Where cpt is the name of your custom post type.
remove_action( 'genesis_entry_header', 'genesis_post_info', 5 );
3. CSS – Hide Post Meta In Entry Header
Using a tool like Firebug, you can find the body class section and use the class in a new CSS rule like this:
.single-portfolio .content .entry-header .entry-meta {
display: none;
}
These methods won’t remove the entry meta in your entry footer.
Leave a Reply