Remove Page Title On WordPress
09/06/2024
There are several methods to remove the page title on WordPress.
Use Plugin to Remove Title On WordPress
There are 2 alternative WordPress plugins to hide titles on posts and pages. Also on the WordPress plugin market, you would find other plugins too.
Hide Title Plugin
Hide title options on the right side of the “New Post” page.
Hide Page and Post Title (Alternative)
Note: Don’t forget to check if plugin compatible with your WordPress version.
Remove Title with Code
Put the code below in the functions.php file.
function remove_post_title($title, $id = null) {
if (is_singular('post') || is_singular('page')) {
return '';
}
return $title;
}
add_filter('the_title', 'remove_post_title', 10, 2);
Remove Title From Specific Page
function remove_about_page_title($title) {
if (is_page('about')) {
return '';
}
return $title;
}
add_filter('the_title', 'remove_about_page_title');
Hide Title with CSS
This method does not remove the title from the page source, CSS only hides on the page.
WordPress set .entry-title
class name as default. If you have changed the class name, use that name.
/* Hide title on all posts and pages */
.entry-title {
display: none;
}
Source
https://stackoverflow.com/questions/45422292/wordpress-remove-the-title-by-way-of-filter