Find out how to remove the title of one or more pages in a Genesis child theme using code.
If you don’t want to display the title of one or more pages of a website, use the following Genesis hook in combination with WordPress conditional tags.
Snippet to remove title on Genesis pages
Add the following fragment at the end of functions.php file:
To see this and another 1097 code snippets of this website, login or subscribe here.
With this second fragment you limit the conditional, indicating that it should delete pages with IDs 55, 67 and 98. Of course, you can modify these values and adjust them to your needs.
Using WordPress conditional tags you can get this code to affect other post types, so:
- Remove the title of one or more blog posts.
- Remove the titles from the CPTs (Custom Post Types).
If you wish, you can also remove the main title from the site.
Conclusion
As you can see, with a single line of code you can remove all the page titles from any Genesis child theme.
Even better, you can limit that effect to only few pages by using WordPress conditionals.
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. 😉