the_content_limit in the sidebar
-
I have this code in my sidebar… the content shows true (first 80 characters) when a category is displayed but when a single post is displayed the sidebar displays all the content (more than 80 characters). This is very weird behaviour, there is no other conditional statements that i can see. Any ideas???
Thanks CG
‘Code:
<?php $recent = new WP_Query(“showposts=3”); while($recent->have_posts()) : $recent->the_post();?>
<?php if( get_post_meta($post->ID, “thumbnail”, true) ): ?>
” rel=”bookmark”><img style=”float:left;margin:0px 10px 0px 0px;” src=”<?php echo get_post_meta($post->ID, “thumbnail”, true); ?>” alt=”alt text” />
<?php else: ?>
” rel=”bookmark”><img style=”float:left;margin:0px 10px 0px 0px;” src=”<?php bloginfo(‘template_url’); ?>/images/thumbnail.jpg” alt=”Default thumbnail” />
<?php endif; ?>
<b>” rel=”bookmark”><?php the_title(); ?></b>
<?php the_content_limit(80, “read more »”); ?><div style=”border-bottom:1px dotted #94B1DF; margin-bottom:10px; padding:0px 0px 10px 0px; clear:both;”></div>
<?php endwhile; ?>’
- The topic ‘the_content_limit in the sidebar’ is closed to new replies.