WordPress.org

Ready to get started?Download WordPress

Forums

Can I Make Password Protected Page Hide Non-Worpress Managed Text? (4 posts)

  1. grypesagon
    Member
    Posted 7 years ago #

    This should be a fun one for you guys.

    I have a page operating on a separate template. (Pagecats.php)

    I have the categories listing on this page only. I don't want the categories to be accessed publicly so I figured put them in this page and password protect it. Below is what the content code looks like.

    <div id="content">
    <div id="sidebar">
    <h3 title="Categories"><?php _e('Categories'); ?></h3>
    <ul>
    <?php list_cats(0, '', 'name', 'ASC', '/', true, 0, 0); ?>
    </ul>
    </div>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <h3><?php the_title(); ?></h3>
    <div class="entry">
    <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
    <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
    </div>
    </div>

    However if you go to this link: http://www.improv-ingboston.com/main/?page_id=3

    You'll see that the categories list and only the wordpress managed text is hidden.

    Do anyone have a if/else code that can see whether or not the password has been entered or not or know if there is a way to get the PHP code to work if entered into the wordpress editor window?

  2. Chris_K
    Member
    Posted 7 years ago #

    There are plugins that can be used to call php functions from within a post. ExecPHP or RunPHP would be good search terms (I don't use 'em, so not positive on the name).

  3. grypesagon
    Member
    Posted 7 years ago #

    I'd rather not incorporate a plugin like that if it can be avoided. I'm making this site for other people who aren't very savvy and the less chance they have of conflicting with the code the better off they'll be.

  4. grypesagon
    Member
    Posted 7 years ago #

    I disappeared for the holidays and was hoping I'd come back to a dazzling display of brilliance. :-(

Topic Closed

This topic has been closed to new replies.

About this Topic