How to Remove / Hide Page or Post Title in WordPress

Title of wordpress post can be removed using the_title filter for a category, single post or page or all pages / posts. Following code will remove title of posts in wordpress category. Place the code to the end of functions.php file of active theme of your website.


function remove_title_of_category( $title, $id = null ) {
if( is_single() ) {  /* this will remove title of post/page on single page and not from list of posts */
if ( in_category('wordpress', $id ) ) {
return false;
}
}
return $title;
}
add_filter( 'the_title', 'remove_title_of_category', 10, 2 );

Hide / Remove post title using CSS

We can hide post title using display property of element which contains the title of page.

  1.  Visit a page / post using Chrome or you favorite web browser.
  2. Right Click on its heading / title text.
  3. Click on inspect.
  4. You will see HTML source of title / heading element.
  5. There will be an attribute class for this element. Note down its value e.g. entry-title
  6. Login into admin dashboard of you site.
  7. Go to Appearance->Theme Editor.
  8. Select the file style.css from files list given on right side bar
  9. Go to end of style.css and place following code at the end:


.entry-title{
display:none !important;
}