I need to create a gallery in wordpress to show the latest 3 posts. The gallery will show the image of the post with the title of the post and part of the post (the paragraph that is before –more– tag in wordpress). I need it to be dynamic just when I add a new post the gallery shows that.
well I did the following code
<div class="blogsgallery">
<?php query_posts('showposts=3'); ?>
<?php while (have_posts()) : the_post(); ?>
<p>
<h3>
<a href="<?php the_permalink() ?>"
rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a>
</h3>
</p>
<div class="entry-content">
<div id="post-thumbnail">
//the size of thumbnail 150X150 px
<?php the_post_thumbnail(array(150,150)); ?>
</div>
//The code will show only the text before the "Read More ..." tag !
<?php
global $more;
$more = 0;
the_content("Read More ...");
?>
</div>
<?php endwhile; ?>
</div>
This a loop to show the latest 3 posts. I need to make it a slider container. after a specific time, i.e 1 minute, slide 1 move to the left and show slide 2, etc …
Please see the photo for more information:
The easiest solution is to change the amount of posts that show up through your settings. I suppose that is not a good solution for you; here is another way to do this:
You will need to edit a page in your theme. You may edit the main page; I’d recommend you make a new page template and use that as your front page.
Then you create a variation of the loop and
query_posts
. Creating the loop with 3 posts (per page) would be done like this:See more info in the WordPress codex; in particular, the template tags page.
Btrnd is technically correct about this. However, you don’t seem to understand how WordPress templates work. (I don’t mean to be offensive). Maybe you’re looking for a plugin to do it for you?
http://speckyboy.com/2010/06/30/top-10-content-slider-plugins-for-wordpress/
You could try anything in the above post. To install a plugin, download it and put it in your plugin directory. Alternatively, you can search for plugins directly from WordPress and install them from the WordPress back-end. See the codex (link below) for how to do this.
http://codex.wordpress.org/Managing_Plugins#Installing_Plugins