more tag doesn’t work.
-
So I’ve added a featured post section for my blog using category slugs and displayed the recent posts below it.
The more tag on the recent posts section works but it doesn’t on the featured post section.
Here is the code of my index.php…
<?php get_header(); ?> <?php include (TEMPLATEPATH . "/top_sidebar.php"); ?> <div id="middle"> <div id="content"> <?php if (is_front_page()):?> <div class="post"> <strong class="h"><span>Featured Post</span></strong> <?php $FP_post_id = your_print_featured_post(1, 'featured_post');?> </div> <?php endif;?> <?php if (have_posts()) : query_posts(array('post__not_in' => $FP_post_id, 'paged' => $paged)); $place = 1;?> <div class="recent-posts"> <strong class="h"><span>Recent Posts </span></strong> <?php while (have_posts()) : the_post(); ?> <h2><a href='<?php echo get_permalink($post->ID)?>'><?php the_title();?></a></h2> <span class="bar"> <span class="by">By <?php the_author();?> On <?php the_time('F j, Y')?><?php edit_post_link(__('Edit'), ' · ', ''); ?></span> <span class="additional"><?php comments_popup_link('No Comments', '1 Comment', '% Comments');?></span> </span> <?php the_content(''); if (strpos($post->post_content, '<!--more-->')){ echo '<p><a href="'.get_permalink($post->ID).'">Click here to continue reading</a></p>'; } ?> <br /> <?php if ($place-- > 0) { ?><div class="ad"><?php echo stripslashes(get_option('YBN_middle_ad'));?></div><?php } ;?> <?php endwhile;?> </div> <div class="ad"><?php echo stripslashes(get_option('YBN_footer_ad'));?></div> <div class="paging"> <span class="alignright"><?php your_next_posts_link('Next entries') ?></span> <span class="alignleft"><?php your_previous_posts_link('Previous entries') ?></span> </div> <?php endif;?> </div> <?php get_sidebar(); ?> </div> <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘more tag doesn’t work.’ is closed to new replies.