I’m trying to embed the nivo slider into a wordpress theme so each slide shows a set of recent image pots and excerpt. At this moment I can get it to show the images but not the post excerpt.
<div id="slides">
<?php $my_query = new WP_Query('showposts=5&category_name=featured'); while ($my_query->have_posts()) : $my_query->the_post(); ?>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
<img src="<?php echo get_post_meta($post->ID, 'nivoimage', true); ?>" alt="" title="<?php the_title(); ?>" />
</a>
<?php endwhile; ?>
</div>
<div class="clear">
Ideally I’d like the excerpt to wrapped in a div so I can style it in css. Does anyone have any ideas?
I should maybe also mention that I’m using the mimbo theme and that doesn’t want to accept any kind of news slider plugin.
Thanks,
Editors Note: Links to template pastes and such:
I’m not quite clear if your saying you can call the excerpt but it’s not showing up or if you don’t know the function to show the excerpt.
If it’s the former it might be a CSS issue, if the latter the following should do the trick:
You can read more about the_excerpt function in the WordPress Codex.