WordPress.org

Ready to get started?Download WordPress

Forums

Show protected posts intro (2 posts)

  1. EHRETic
    Member
    Posted 1 year 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
    ɹoʇɐɹǝpoɯ
    Posted 1 year 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.
    http://wordpress.org/extend/plugins/protected-post-personalizer/screenshots/

    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