Show protected posts intro (2 posts)

  1. EHRETic
    Posted 3 years ago #

    Hi guys,

    Since WordPress, this "hack" is not possible anymore since code lines are not the same.

    $output = get_the_password_form();
    return $output;

    Replaced it with this:
    $content = $pages[$page-1];
    $content = explode('<!--more-->', $content, 2);
    $output = "";
    $output .= $content[0];
    $output .= get_the_password_form();
    return $output;

    I wonder if somebody can "update" the trick... ;-)

  2. cubecolour
    Posted 3 years ago #

    Using a plugin will be a much better solution than hacking core files

    The protected post personalizer plugin should do this, however it has not been updated for a while & I have not tested it.

    You may find be a more lightweight plugin If you spend a little time searching the plugins directory on this site

Topic Closed

This topic has been closed to new replies.

About this Topic