Password protecting my secondary blog (5 posts)

  1. nollbroek
    Posted 6 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
    Posted 6 years ago #

  3. nollbroek
    Posted 6 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
    Posted 6 years ago #


  5. nollbroek
    Posted 6 years ago #

    Template Name: Blog2
    <?php get_header(); ?>
    <!-- Side ContentWrapper START -->
    <div id="ContentWrapper">
    <!-- Side SC START -->
    <div class="SC">
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'category_name' => 'Prive',
    	'paged' => $paged
    <?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 class="PostInfo">Posted by: <?php the_author() ?> in: <?php the_category(', ') ?> <?php edit_post_link('Edit', ''); ?></p>
    <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; ?>
    <ul class="PostCom">
     <li><?php comments_popup_link('<strong>0</strong> Comments', '<strong>1</strong> Comment', '<strong>%</strong> Comments'); ?></li>
    <!-- Post END -->
    <?php endwhile; ?>
    <div class="Nav" class="center">
    <?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?>
    <?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; ?>
    <!--  Side SC END -->
    <!--  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