[resolved] P2 Theme: Tip to fix a bug in title display (2 posts)

  1. shdo
    Posted 7 years ago #

    The Problem: when you edit a post by the post form in the theme and not in Admin Site, the title is changed, if changed, It is showed and appear in the theme.

    To let better I made the follow:

    In the functions.php in the function prologue_inline_save, I comment the following:

    function prologue_inline_save(){


    /* $clean_title = str_replace('…', '', $thepost->post_title); */

    /* if( strpos($thepost->post_content, $clean_title ) !== 0 ) {
    $post_title = $thepost->post_title;
    } else {*/
    $post_title = prologue_title_from_content( $post_content );


    Because commenting this lines always that the content is edited the title is changed.

    I love P2 Theme, is very cool, thank you for it.

  2. shdo
    Posted 7 years ago #

    Remember that, this line:

    $post_title = prologue_title_from_content( $post_content );

    Wasn't commented. It is the function to extract a title of the content.

Topic Closed

This topic has been closed to new replies.

About this Topic