php - Change Wordpress Post Title Placeholder -
I am creating a custom post type and want to merge placeholder text in the title area of the new post section.
Requirements:
- This can be for a specific post type only, not for all posts.
- This post type can not reflect the name, it should be completely custom text Br> - This is not editable from the WordPress Admin section, the functions within the custom function function can be placed in the .ff file.
You can put your snapet in your functions.php
function change_default_title ($ title) {$ screen = get_current_screen (); If ('your_custom_post_type' == $ screen- & gt; post_type) {$ title = 'Your custom placeholder text'; } $ Heading; } Add_filter ('enter_title_here', 'change_default_title'); This title should be changed.
found here:
Comments
Post a Comment