How to Hide Titles on WordPress Posts and Pages

By December 18, 2018 June 17th, 2019 WordPress

If, for any reason, you want to hide the titles of your posts or pages, read on, it’s pretty easy!

Hide Title Plugin in WordPress

How to Hide Titles in Single Posts

Here’s a simple way of hiding a single post. If you don’t want to mess with custom css, you can use a plugin instead (it’s always the easy way to solve WordPress problems for free). Just follow these steps:

  1. Search, install, and activate Hide Title plugin (or a similar plugin).
  2. Open the post or page that you want to hide.
  3. At the right side of your screen, you will find the Hide Title meta box.
  4. Check the box that says “hide title on singular page views.
  5. Click the update or publish button (if it’s a new post).

Note 1: With the above technique, titles will still be in your site’s archive pages as well as your homepage. It’s only on single page views that the titles will be hidden.

Note 2: This technique is applicable to landing pages as you don’t want to show the post title in such cases.

Looking to take your WordPress skills to the next level and learn how to build & monetise authority sites?

The guys over at Authority Hacker released a free training webinar based on their epic Authority Site System course. The webinar covers everything from keyword research to outsourcing content, and getting links so you can actually rank your site in Google (it's how you found this very page).

While this free training focuses on affiliate marketing as the monetisation method (mainly because it's the most passive strategy around at the moment), you can apply these strategies to almost any site... it's pretty neat!

Grab the free training webinar here!

How to Hide Titles in all Pages or Posts

Here are the steps to hiding titles on your WordPress pages and posts:

  1. Find your site’s theme template.
  2. Edit your WordPress theme by adding this PHP code to the functions.php file:

function wpb_hidetitle_class($classes) {
if ( is_single() || is_page() ) :
$classes[] = 'hidetitle';
return $classes;
endif;
return $classes;
}
add_filter('post_class', 'wpb_hidetitle_class');

Note 1: The above code will only work if your theme supports the post class function.

Note 2: If you only want to remove the titles from posts and not pages, you must delete the part of the code that says:

|| is_page()

  1. Open your theme’s stylesheet and add this CSS code:

.hidetitle .entry-title {
display:none;
}

Note 1: The above code will allow for the CSS to display accurately.

Note 2: This technique is suitable for WordPress themes that have the entry-title in their post or page title codes.

CSS Class Used for Your Theme’s Post Titles

Do the following steps to find out the type of CSS class your theme is using in its post titles:

  1. Open the particular post in Chrome or Firefox.
  2. Let your mouse hover over the post title.
  3. Right click on the post title and select the Inspect Element option.

Note: After completing all the steps above, the source code for the particular post title will be highlighted. You can, therefore, see the CSS class that your theme is using. Here’s an example, if your theme is using article-title for its CSS class. Just change it into this:


.hidetitle .article-title {
display:none;
}

Note: The technique above will work for most WordPress themes.

Removing Titles in Single Posts and Throughout the Site

In the techniques we mentioned above, keep in mind that although the titles are hidden, they’re not removed from your theme’s template. If you want to totally remove the titles from the templates, you need to remove the the_title code. For single post views, you will find the code in the single.php file.

Now, if you want to remove the titles in all posts and pages, you need to edit files such as single.php, index.php, and archive.php.

Which Method to Use and Why

If you’re a beginner at WordPress, you might find the steps we mentioned above to be a bit overwhelming. For the sake of learning, you can try editing your theme’s codes in a trial and error fashion. However, if you’re not up for such a challenge (yes, we’ve all been beginners once), we recommend using the plugin because it’s simpler and easier.

MangoMatter WP Team

About MangoMatter WP Team

We live to solve WordPress issues, and help beginners on their WP journey :)