Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Partial page lock with a custom password (all users – members or not)

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Troubleshooting › Partial page lock with a custom password (all users – members or not)

  • This topic has 3 replies, 2 voices, and was last updated 13 years, 2 months ago by orenlebbo.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • March 6, 2012 at 5:23 am #5762
    orenlebbo
    Member

    Hi,

    I want to lock part of my content with a password.

    I want to let visitors see the content only after submitting a password without any relation with them being members of the site or not.

    Is it possible?

    Thanks :)

    Oren

    March 6, 2012 at 5:32 am #42759
    orenlebbo
    Member

    Can’t find anything

    March 6, 2012 at 6:59 am #42760
    Peter
    Member

    Try this:

    http://codex.wordpress.org/Content_Visibility

    March 6, 2012 at 7:21 am #42761
    orenlebbo
    Member

    Found this WP built-in solution (No plugin needed):

    Instructions

    For WordPress 2.0 or 2.1, open /wp-includes/template-functions-post.php

    For WordPress 2.2 through 2.8+, open /wp-includes/post-template.php

    Find the following text:

    $output = get_the_password_form();

    return $output;

    Replace it with this:

    $content = $pages[$page-1];

    $content = explode(‘<!–more–>’, $content, 2);

    $output = “”;

    $output .= $content[0];

    $output .= get_the_password_form();

    return $output;

    This next step is optional, but I think it makes it nicer.

    In the get_the_password_form function, find the following text (may vary between versions):

    This post is password protected.

    And replace it with this:

    The rest of this post is password protected.

    Or whatever text you would like it to show.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ