WordPress.org

Ready to get started?Download WordPress

Forums

password protecting the blog itself (3 posts)

  1. yogaboat
    Member
    Posted 9 years ago #

    when the home page is a static page, and not the default blog index? that may have nothing to do with it, but anyway.

    Here is the site.

    I made a static page the home page so that I could hide the blog from public viewing by password protecting the blog page. From the static home page, the blog archives & categories are linked. However, even though the blog page is password protected, the posts come up. Does it have something to do with the showposts line? This is the opening code snippet from the page we set up as the blog page:

    <?php
    /*
    Template Name: Blog
    */
    ?>
    <?php get_header(); ?>

    <div id="content" class="narrowcolumn">

    <?php query_posts("showposts=10"); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <div class="post">
    <h2 id="post-<?php the_ID(); ?>" etc etc etc

    I have two sites that are dependent on password protecting certain posts and/or pages. So far I haven't gotten it to work on either of them. I really like WP, and would love to get this resolved.

  2. yogaboat
    Member
    Posted 9 years ago #

    How can .htaccess be used to protect files, not entire directories? in this case, the blog.php file I made?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.