3 special tiles to show recent posts automatically
I have 3 tiles up on my home page that shows a picture, the date and title of a post, and I want to show 3 most recent post in them. I tried using
<?php query_posts("post_per_page=1"); the_post(); ?>tag on each of them and reset the query using
<?php wp_reset_query(); ?>at the end of each tile’s code, but all of the tiles shows the one recent post, I mean they show the same thing.
Plus, I’m using custom fields to store the path of image for each post, but it doesn’t work either, I use this code for the image src:
<?php echo get_post_meta($post->ID, 'post_image', true) ?>
`PLEASE help me with these
- The topic ‘3 special tiles to show recent posts automatically’ is closed to new replies.