How to Disable Title on Posts, Pages, or Other Post Types?

No results found. Try again with different words?

Search must be at least 3 characters.

How to Disable Title on Posts, Pages, or Other Post Types?

The title is the name of your post, page, or other post types you might have on your website. The title appears in the frontend and can be disabled from the Title(eye Icon) or with the custom code

Method 1 – Page/Post Title

Page/Post meta settings or Astra Settings are available for each individual post or page. Thus, using the Eye Icon on the Page/Post Title you can decide for each post, page, or post type to disable the Title where needed.

To make it intuitive and easy to enable/disable we have provide this option right on the Title section, without the need to open the Astra settings.

Astra Disable Title Settings

If you wish to apply this setting to a larger number of pages or posts, then editing every page and updating the above setting can be time-consuming. In this case, you can use Astra Bulk Edit plugin. This will allow editing the above settings on multiple pages.

Method 2 – Custom Code

You can also do this using a custom code. This can be a great solution if you want to disable titles on all posts, pages, or other post types.

You can add the following custom code to the functions.php file of your Child Theme:

 * Disable title on all post types. 
function your_prefix_post_title() { 
 $post_types = array('page','post'); 

 // bail early if the current post type if not the one we want to customize. 
 if ( ! in_array( get_post_type(), $post_types ) ) { return; } 

 // Disable title. 
 add_filter( 'astra_the_title_enabled', '__return_false' ); 
add_action( 'wp', 'your_prefix_post_title' );

If you don’t have your Child Theme installed, please check this article on how to do it. 

If you are not sure how to add this code, please check this article.

This code will remove titles on all of your pages and posts. You can apply this code only to pages, posts, any of your other post types, or all of them by modifying the bolded part of the code above. Here are the examples how this should look like:

  • To remove titles on all your posts only:
$post_types = array('post');
  • To remove titles on all your pages only:
$post_types = array('page');
  • To remove titles on all pages, posts and example custom post type. This is the example which you can use to add any other post types you want the above code to be applied:
$post_types = array('page','post','custom-type-1');
Was this article helpful?
Did not find a solution? We are here to help you succeed.

Related Docs

Grab this rare opportunity to save up to 50%


Don't Miss Our Biggest Discount


You are backed by 100% risk-free money-back guarantee.

Scroll to Top
Now choose your preferred
page builder addon
Choose your preferred page builder addon

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.