Custom Template for Specific Category
-
Hey there guys, I’ve been tryin’ to get this right for a few hours, but I guess I’m not that good at custom templates.
How would I go about making this page template show posts from only one specific category? As if it were a loop?
<?php
/*
Template Name: No Sidebar Template
*/get_header(); ?>
<div class="left left_fullwidth"> <div class="articles article"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <h1 class="title"><?php the_title(); ?></h1> <div class="post"> <?php the_content(); ?> </div> <?php edit_post_link('Edit this entry.', '<p style="border-top:1px dotted #999;padding-top:6px;margin-top:10px;">', '</p>'); ?> </div> <div class="wpn_box-bottom"></div> <!-- Comments // --> <?php /* Remove the // below to enable comments on pages */ // comments_template(); ?> <!-- // Comments --> <div class="wpn_clear"></div> <?php endwhile; ?> <?php else : ?> <?php include ('editable/404/404-error.php'); ?> <?php endif; ?> </div> <?php get_footer(); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Custom Template for Specific Category’ is closed to new replies.