Are you looking for a way to hide the page title on your WordPress website? If so, you’re not alone. Many WordPress users have this same question. Fortunately, hiding the page title is relatively easy and only requires a few steps. Let’s take a look at how it’s done.
How to Hide the Page Title in WordPress
The first step is to access the “Screen Options” tab in your WordPress Dashboard. This tab can be found at the top right of your screen when editing a page or post. Once you click this tab, you will see a checkbox with “Show/Hide Title” next to it. Make sure that this box is unchecked in order to hide the page title on any given page or post on your website.
Once you have hidden the title, it’s time to add some code that will make sure that it stays hidden even when someone visits your website. To do this, you need to access your theme’s functions file and add some simple code snippets like these ones:
function remove_page_title() { return false; } add_filter(‘display_post_states’, ‘remove_page_title’); //Hide titles from pages function remove_title_pages() { if (is_page()) { remove_action(‘wp_head’, ‘adjacent_posts_rel-link-wp-head’); } } add_action(‘template_redirect’, ‘remove_title_pages’); //Hide titles from posts function remove_title() { if (is_single()) { remove_action(‘wp_head’, ‘adjacent post rel-link-wp-head’); } } add filter(‘template redirect’,’remove title’);
Conclusion
Hiding page titles in WordPress is easier than ever with just a few clicks of a button and some simple code snippets! By following these steps, you can easily hide any unwanted page titles on your website and keep them hidden even when visitors arrive on those pages. And remember – if at any point you decide that you want to show the page title again, simply reverse all of these steps! Good luck!