WordPress.org

Ready to get started?Download WordPress

Forums

Password protecting my secondary blog (5 posts)

  1. nollbroek
    Member
    Posted 5 years ago #

    Hi there,

    I have the following problem:
    I use the theme InSense and made a secondary blog for all my private posts. (filter them from the home and made a blog page with only that category) I can't however seem te password protect this page.

    Can anyone help me with this? I searched the forum but no one has come up with a clear answer yet...

  2. MichaelH
    Member
    Posted 5 years ago #

  3. nollbroek
    Member
    Posted 4 years ago #

    although this probably will work, I actually just want the built-in feature to password restrict it. As in: the visibility-option set to Password protected. This normally works fine, but since the template is in fact a copy of the main index, I think the password feature doesn't exist in this php.

    Does anyone know the code to use the wordpress password feature and how to apply it to my template?

  4. nollbroek
    Member
    Posted 4 years ago #

    Anyone?

  5. nollbroek
    Member
    Posted 4 years ago #

    <?php
    /*
    Template Name: Blog2
    */
    ?>
    
    <?php get_header(); ?>
    
    <!-- Side ContentWrapper START -->
    <div id="ContentWrapper">
    
    <!-- Side SC START -->
    <div class="SC">
    
    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'category_name' => 'Prive',
    	'paged' => $paged
    );
    query_posts($args);
    ?>
    
    <?php $countervariable=1; if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
    
    <div class="Post" style="padding-bottom: 50px;">
    
    <div class="PostHead">
     <h1><a href="#"></a><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
     <p class="PostDate">
       <strong class="day"><?php the_time('d'); ?></strong>
       <strong class="month"><?php the_time('M'); ?></strong>
     </p>
      <p class="PostInfo">Posted by: <?php the_author() ?> in: <?php the_category(', ') ?> <?php edit_post_link('Edit', ''); ?></p>
    </div>
    
    <div class="PostContent">
    
    <? if (is_home() && (!$paged || $paged == 1) || is_search() || is_single() || is_page()): ?>
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    <? else: ?><?php the_content() ?><? endif; ?>
     </div>
    
    <ul class="PostCom">
     <li><?php comments_popup_link('<strong>0</strong> Comments', '<strong>1</strong> Comment', '<strong>%</strong> Comments'); ?></li>
    </ul>
    
    </div>
    <!-- Post END -->
    
    <?php endwhile; ?>
    <div class="Nav" class="center">
    <?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?>
    </div>
    <?php else : ?>
    
    <h2 class="center">Not Found</h2>
    <p class="center"><?php _e("Sorry, but you are looking for something that isn't here."); ?></p>
    
    <?php endif; ?>
    </div>
    <!--  Side SC END -->
    
    </div>
    <!--  Side ContentWrapper END -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    This is the code for my secondary blog, can anyone tell where I can password protect it with what code?

Topic Closed

This topic has been closed to new replies.

About this Topic