• hello wp commuity ??

    I am wanting to have a copy of the title in my content, and not simply want to duplicate the the_title (); in single.php, because this does not make the title value available in dasboard, I duplicate the title to have it in my content but available in post edit. have a copy of values of post_title in my post_content

    add_filter( 'wp_insert_post_data' , 'get_post_title' , '999', 2 );
    function get_post_title( $post_content,  $postarr='' ) {
    $post_content['post_content'] .= $post_title;
        return $post_content;
    }

    I want to do this in all my posts.

    thanks to all.

  • The topic ‘have a copy of values of post_title in my post_content’ is closed to new replies.