make only specific post appear on front page
-
hi im trying to make site only show four specific posts on the homepage.
any help would be appreciated. the code is<?php { echo ''; } ?> <?php } else { include(TEMPLATEPATH . '/includes/slide.php'); } ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); $c++; // increment the counter if( $c % 2 != 0) { $extra_class = 'leftpost'; } else { $extra_class = 'rightpost'; } ?> <div <?php post_class($extra_class) ?> id="post-<?php the_ID(); ?>"> <?php if ( has_post_thumbnail() ) { ?> <?php if ( function_exists( 'get_the_image' ) ) { get_the_image( array( 'custom_key' => array( 'post_thumbnail' ), 'default_size' => 'full', 'image_class' => 'aligncenter', 'width' => '299', 'height' => '149' ) ); }?> <?php comments_popup_link('0', '1', '%', 'comm'); ?> <?php } ?> <h2 class="title"><a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <div class="entry"> <?php //the_content(''); ?> <?php truncate_post(150, true); ?> </div> <div class="meta"> <?php the_time('F d, Y'); ?> in <?php the_category(', ') ?> </div> </div> <?php if(++$counter % 2 == 0) : ?> <div class="clearp"></div> <?php endif; ?> <?php endwhile; ?> <div class="navigation"> <?php include('includes/wp-pagenavi.php'); if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?> </div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php get_search_form(); ?> <?php endif; ?>[the above code is partly broken because is was posted without being properly marked as code – see http://codex.ww.wp.xz.cn/Forum_Welcome#Posting_Code ]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘make only specific post appear on front page’ is closed to new replies.