the_content() doesn’t work…why?
-
Hi everyone,
i made the following template in order to create a private page and leave visible the link to all users, logged and not logged:<?php /* Template Name: Pagina Privata */ ?> <?php get_header(); ?> <?php get_sidebar(); $page_id = $_REQUEST['page_id']; ?> <div class="content"> <?php if(is_user_logged_in()): ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php echo $page_id ?>"> <h4><?php the_title(); ?></h4> <?php the_content('<p class="serif">Read the rest of this page »</p>'); ?> <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> </div> <?php endwhile; endif; ?> <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?> <?php else:?> <h4>Pagina protetta da password.</h4> <form name="loginform" id="loginform" action="http://localhost/area/wp-login.php" method="post"> <p> <label>Nome utente<br /> <input type="text" name="log" id="user_login" class="input" value="" size="20" tabindex="10" /></label> </p> <p> <label>Password<br /> <input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label> </p> <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> Ricordami</label></p> <p class="submit"> <input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="Collegati" tabindex="100" /> <input type="hidden" name="redirect_to" value="<?php bloginfo('url');?>/?page_id=<?php echo $page_id;?>" /> <input type="hidden" name="testcookie" value="1" /> </p> </form> <?php endif; ?> </div> <div class="clear"></div> <?php get_footer(); ?>why i can’t see the page content?
The topic ‘the_content() doesn’t work…why?’ is closed to new replies.