Trending News
Home / Web Development / Remove page or post title in some pages – WordPress

Remove page or post title in some pages – WordPress

Hi all,
Today I ask you, related to hiding wordpress page title of one single page. “Is it possible to remove the title of one single page without using a plugin?”
Yes, We can hide the page title without using plugin or jquery.Today we are discussing one important topic related to wordpress page title. The WordPress is a Content Management System(CMS).




I am using one wordpress theme and I would like to hide the page title from some pages like contact us,home, about us etc. Hide the page title or post tile in some condition or some web pages.
There are two methods are available for solving this problem.

Method 1: Use conditional tags and edit your theme files




You can use this method for solving this problem. Edit the theme file like below:

Description:This says: For pages that do not have the slug Contact Us, about, display the title. The is_page(); is a inbuilt function in wordpress. It will return true if an empty value is passed.

Method2: Hide title via CSS

The CSS method is very simple and easy can understand, hide the title in our some web pages in wordpress theme. There are some steps are available for hiding operations:




Step 1 – Find the Title Class Name

First we find the title class name. Find the name of the classs associated with your title tag.

Example:Contact Us

Step 2 – Find the Page or Post ID

Find the page id or post id associated with your title tag. Find the id, for hiding.

Example:.page-id-18




Step 3 – Insert Code into Stylesheet

Insert the hiding code into stylesheet. In wordpress, edit the style.css
(Appearance > Editor > Stylesheet – style.css)
FOR PAGES:
.page-id-18 .entry-title {display: none;}
For POST
#post-17 .entry-title {display: none;}

Summary

Hide the Title only on Posts

.type-post .entry-title {display: none;}

Hide the Title only on Pages

.type-page .entry-title {display: none;}



Hide Title only on a Specific Page

.page-id-18 .entry-title {display: none;}

Hide Title only on a Specific Post

.post-id-18 .entry-title {display: none;}

Add CSS to Hide that Title

.entry-title {display: none;}



If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

Loading Facebook Comments ...
Social Media Auto Publish Powered By : XYZScripts.com