Remove WP post title input from the back end.

madvogue29

Member
Jun 4, 2020
30
6
8
Hi Team I am trying remove post title entry on WP if post type = "xyz" (a custom post type). is there a way to do so ?

Thanks
 

videva

Member
Aug 25, 2020
75
53
18
Hi Team I am trying remove post title entry on WP if post type = "xyz" (a custom post type). is there a way to do so ?

Thanks
are you want to remove post title from tag <title> ? </title> ??
or
from <h1 class="entry-title"> ?? </h1>
 

madvogue29

Member
Jun 4, 2020
30
6
8
1603108506716.png

I have a custom post event and when I click on Add New Event it prompts for this input like all other events. I want this option to be disabled. in the backend. In the Front end I have ACF doing the job for me.
 

frizzel

Well-known member
Trusted Uploader
Jun 13, 2019
485
253
63
Wherever my imagination takes me
Each CPT has a 'supports' section, where 'title' is one of the values. If you have access to where the CPT is registered, simply remove or comment that line.
Otherwise, you might try this:
PHP:
function hide_cpt_title() {
     remove_post_type_support('your-custom-post-type', 'title');
}
add_action('admin_init', 'hide_cpt_title');
This should be added in your functions.php and of course change 'your-custom-post-type' to the slug of the actual CPT.
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu