Make Homepage display only posts from a single category
-
this is my code, please help my website is https://www.pimpanime.com and i need all the recent posts to disappear looks really tacky like that i just want the 1 post at the top and only 1 category to appear on front page like site-news or updates and information ect.
<?php get_header(); ?> <div id="content"> <?php include (TEMPLATEPATH . '/slide.php'); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="box <?php if (++$counter % 2 == 0) { echo "last"; }?>" id="post-<?php the_ID(); ?>" id="post-<?php the_ID(); ?>"> <div class="boxtitle"> <h2><a>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2> <div class="data"> <span class="clock"> On <?php the_time('F - j - Y'); ?></span> <span class="comm"><?php comments_popup_link('0 Comment', '1 Comment', '% Comments'); ?></span> </div> </div> <div class="cover"> <div class="entry"> <?php cldb_home_image();?> <?php the_excerpt(); ?> <div class="clear"></div> </div> </div> </div> <?php endwhile; ?> <div class="clear"></div> <div id="navigation"> <?php if(function_exists('wp_pagenavi')) : ?> <?php wp_pagenavi() ?> <?php else : ?> <div class="alignleft"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div> <div class="clear"></div> <?php endif; ?> </div> <?php else : ?> <h1 class="title">Not Found</h1> <p>Sorry, but you are looking for something that isn't here.</p> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
[Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still – use the pastebin. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Make Homepage display only posts from a single category’ is closed to new replies.