• I am creating a new theme and would like it to have the following features when creating new or editing existing posts and pages:

    1. Helpful text explaining how to write page titles, listed above the title input box.
    2. Limit the amount of characters entered within the title input box so a user can clearly see when the limit has been reached.

    I would like to this by completely removing the title and permalink options from pages and posts and replace them with my own custom ones (and do this through the themes function.php).

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter samicooper

    (@samicooper-1)

    I am able to hide the Title and Slug input fields:

    add_action('admin_init', 'hide_title');
    function hide_title() {
    	remove_post_type_support('post', 'title');
    	remove_post_type_support('page', 'title');
    }

    I am also able to change the placeholder text for the Title input field:

    function wpb_change_title_text( $title ){
    	$title = 'Enter page address here';
        return $title;
    }
    add_filter( 'enter_title_here', 'wpb_change_title_text' );

    But still no luck with creating my own Title and Slug input boxes

    Thread Starter samicooper

    (@samicooper-1)

    I am able to create my own metabox for Title and Slug using add_meta_box(), but how do I get the add_action( ‘save_post’,’…’,x,y); to “override” the standard post_title and post_name (the slug)?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Create custom Page Title options when creating a new page or post’ is closed to new replies.