LetSOT Tutorials How to Hide Page and Post Titles in WordPress

How to Hide Page and Post Titles in WordPress

When you finish designing and writing articles on a website, then want to preview the results you are working on, but you realize that page titles seem to spoil the design of the website.

So you aim to remove or hide page titles, but WordPress doesn’t include an option to do this.

It all depends on the theme you use. If the title displayed is too big then what will you do? This is why you should take a look at how to hide page and post titles in WordPress below.

We will use several methods that can be used to disable one title or hide all of them.

How to Hide All Page and Post Titles in WordPress

This method is safe to use, but before making any changes, it’s a good idea to back up your website first.

There are several methods to hide post or page titles, we will show them all here.

Using CSS Code Lines

First I will try to remove all post and page titles in WordPress using CSS. All it takes is a line of code to get rid of the title.

  1. First, you go to the WordPress admin dashboard.
  2. In the left panel, go to Appearance > Customize menu.Open appearance customize
  3. In the left panel find and click on the Additional CSS menu.Open the Additional CSS menu
  4. Then, paste the following CSS in the Additional CSS column.
    Paste the css code

You see the preview title on the right will disappear. Likewise, when you open a page or post, the title will also disappear. But you will see the post title on the widget will still be there.

If the code above doesn’t work, you need to find out what CSS class your theme uses to display the title.

In the right-hand preview, right-click the post title and click Inspect. If using a browser other than Chrome, this is usually the Inspect Element or Inspector.

Right click to see css code

A new screen will appear with a code area. Look around the highlighted code to find the class name H1 or H2, for example : h1 class="entry-title".

Instead of “entry-title”, it might be “post-title”, “page-title”, or something else depending on the theme you are using.

Use the CSS code above, but change the “entry-title” for the existing CSS classes in your theme.

Find css from title

How to Hide Page Titles in WordPress

Maybe you just want to hide all page titles without posts. In this case, you just need to change the CSS code a little bit above. Just add “.page” in front of the code. Example :

That way you should have successfully hidden all page titles on your site.

How to Hide Single Page Title in WordPress

If you want to hide only one page title. You have two options namely, by using a plugin or using a modified version of the above CSS code that targets the page by ID.

You can use plugins made specifically to hide titles, such as Hide Page And Post Title.

But if you use too many plugins it will have an impact on website speed.

Instead of using a small plugin that only has one function, you can use a website builder plugin like Elementor. Elementor also has a feature to hide page titles with a simple toggle.

Here’s how to hide page titles with Elementor.

  1. Open any page on the WordPress dashboard. After that, select Edit with Elementor.Click edit with elementor
  2. Then click Settings in the lower left corner.Click settings in the lower left corner
  3. In Hide Title, slide the toggle to hide the title.Swipe toggle to hide title

The next method is to use CSS code to target specific pages in WordPress.

First, you need to know the page ID. On the WordPress dashboard, go to All Pages and hover over the title of the page you want to hide.

In the lower left corner, you will see a link appear. It contains the ID of the page after “?post=”. In this case my example page ID is “2”.

View Page ID

Now, use this ID to target the page using CSS, replacing “2” with the ID you found, like this.

Use the following CSS code

If it doesn’t work when you try, maybe the WordPress theme you are using uses a different CSS class.

Inspect Element on the page title to see the CSS classes used by your theme.

How to Remove WordPress Page Titles

You may not have thought that not filling in the title and leaving it blank can already remove the title on the page.

But it’s actually not a good idea. Permalinks are very important for SEO, and WordPress usually generates slug based on the title. If you don’t give a title, it will make it use random numbers or strings of letters, which can have a bad effect on SEO.

You can still manually change the permalink (URL slug), but you’ll have to do that every time you create a new page.

Clear page title

In addition, untitled posts and pages are displayed on the dashboard as “(no title)”. When you have a lot of pages like that, you will have a hard time looking for pages.

Untitled page

And that’s not the only problem you’re having. Depending on the theme you use, untitled pages or posts will also be displayed as “(no title)” on the front page of the website.

For example, if you have a menu page, or use the Recent Posts widget. This will make your website unnavigable.

Untitled page view

You should consider this way, because it will be very bad in SEO. You can use other methods, such as using a plugin or using CSS code.

How to Hide WordPress Post Titles

Hiding all post titles is as easy as hiding all page titles as above.

Using the same CSS as before, if in the guide above I used “.page” to hide pages, then to hide posts you need to use “.post”.

Now all posts don’t show the title, but the normal page will still show it.

Untitled post

How to Hide WordPress Single Post Titles

Hiding single post titles is pretty much the same as hiding page titles, as I discussed above.

You can use a plugin for title remover, or target post IDs with CSS.

If you want to use CSS, the code is slightly different. On the WordPress dashboard, go to All Posts and hover over the title to see the post ID. Then use the following code, replacing the number “2” with the post ID that you have.

If it doesn’t work, try checking the class used in the post title. By clicking Inspect Element on the title.

Summary

Because there is no default way that WordPress provides to hide page and post titles. Then you need to use some of the methods mentioned above.

I do not recommend you to use a plugin to solve this problem, because it will slow down the loading of your website.

We recommend using the simple CSS code above, even though it’s a little complicated but it’s better than overloading the server.

And also avoid removing titles on posts or pages, because that will have a bad impact on SEO.

That’s all, if you have any questions please leave a comment in the column below.

5 Likes

Author: Reza Istiawan

Leave a Reply

Your email address will not be published. Required fields are marked *