WordPress.org

Ready to get started?Download WordPress

Forums

viewlevel2 exclude pages (5 posts)

  1. c0c0c0
    Member
    Posted 8 years ago #

    Hello,

    I am using viewlevel2/Wordpress 1.5.2 and I want to exclude pages from not being viewed in the view level options. I have gone as far as creating a page.php to try to fix this. If you use this plugin and have sucessfully done this or know of a way to allow my pages to be viewed with the viewlevel set I would appreciate it.

  2. emt036
    Member
    Posted 8 years ago #

    I currently use ViewLevel 2.1.0 from http://blog.firetree.net/2005/08/25/viewlevel-20/ and WP 2.0.2 (though I also did have it running on 1.5.2). I am not sure I 100% understand you, but if you want to prevent pages from being displayed to someone with a viewlevel less than you specify, it is possible.

    Unfortunately, I don't believe the vl=1 method works for pages. Instead, under the "Write Page" screen for the post that you want to protect/prevent unauthorized viewing:
    1) Scroll down to "Custom Fields" (hit the + to expand it if need be).
    2) Under "Add a New Custom Field," type viewlevel in the key box, and your desired viewlevel (i.e. 1,2,3,etc.) into the value box.
    3) Press "Add Custom Field" button.

    That's it. Hope that helps.

  3. c0c0c0
    Member
    Posted 8 years ago #

    I tried doing that. I made brand new pages and made the view level * and it still made the pages set to 1 (that is my default page view. This and the vl=* method works fine for posts, however pages are unaffected by either method. Thank you.

  4. emt036
    Member
    Posted 8 years ago #

    Hmm, odd. I've made a few changes to WP and Viewlevels, but I don't think either would cause mine to work, and yours not. The only thing I added in page.php was:

    <?php if(function_exists('vl_restricted'))vl_restricted(); ?>

    to show the little lock icon on protected pages. And the only thing I added to viewlevels.php was some code to hide "Email to a Friend" and "Print" links on protected pages.

  5. c0c0c0
    Member
    Posted 8 years ago #

    I wanted to update that I am now using the latest version of wordpress and view level and I still have not resolved this.

    If anyone can help me with this I would appreciate it.

Topic Closed

This topic has been closed to new replies.

About this Topic