caption outside loop and how to not duplicate content?
-
Hi
I got theme,
Inside loop located usual content of pages posts ect. On a side of the page are i got 5 last post showing in each page outside the loop. i got 2 troubles:1)Images in outside loop content doesn’t appears right. It doesn’t show usual frame around the images instead i see code something like
[caption id="attachment_105" align="alignright" width="158" caption="car"]
on a top of picture and[/caption]
on a bottom
2) how to make, that the preview on a side wouldn’t duplicate post in the loop?
thank u
tha is the code which i’m using:<div class="content"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post_title" ><h1 class="storytitle"><a>" rel="bookmark"><?php the_title(); ?></a></h1> </div> <!– close post title –> <div class="main_content"> <?php the_content('Read more...'); ?> </div> <div>Date: <?php the_time('j F, Y'); ?> </div> <?php endwhile; else: ?> <?php endif; ?> </div> <div style="float:left; width:23%; list-style:none; text-align:left; margin:20px 0 0 5%;"> <?php $posts_new = get_posts('numberposts=5'); foreach ($posts_new as $post_new) : echo ' <li><h3><a href="'; echo get_permalink($post_new->ID); echo '">'; echo $post_new->post_title; echo '</h3></li> '; echo '<div class="post">'; echo the_time('j F, Y'); if ( preg_match('/<!--more(.*?)?-->/', $post_new->post_content, $matches) ) list($post_new->post_content,$junk) = explode($matches[0], $post_new->post_content, 5); echo $post_new->post_content; echo '<a href="'; echo get_permalink($post_new->ID); echo '">'; echo 'Read More...'; echo ''; echo '</div>'; endforeach; ?> <?php wp_list_pages('include=175&title_li='); ?> </div>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘caption outside loop and how to not duplicate content?’ is closed to new replies.