Pretty new to WP and would like to know how I can get my homepage to always automatically display some of the most recent posts on my site. 
- Has been a member for 3-4 years
- Exclusive Author
- Sold between 10 000 and 50 000 dollars
- Bought between 1 and 9 items
- United States
- Referred between 1 and 9 users
Pretty new to WP and would like to know how I can get my homepage to always automatically display some of the most recent posts on my site.![]()
you would use the wordpress loop with the query functionality:
<?php $featured = new WP_Query();
$featured?>query('showposts=3');
while($featured->have_posts()) : $featured->the_post();
$wp_query->in_the_loop = true;
$featured_ID = $post->ID;
?>
<li>
<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<p><?php the_excerpt(); ?></p>
</li>
<?php endwhile; ?>
The <p> and <h4> tags can be anything for the title and content. And you would change the number in showposts for how many you want to display. The li's are also for styling.
</h4></p>Pretty new to WP and would like to know how I can get my homepage to always automatically display some of the most recent posts on my site.![]()
you would use the wordpress loop with the query functionality:
<?php $featured = new WP_Query(); $featured?>query('showposts=3'); while($featured->have_posts()) : $featured->the_post(); $wp_query->in_the_loop = true; $featured_ID = $post->ID; ?> <li> <h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4> <p><?php the_excerpt(); ?></p> </li> <?php endwhile; ?> Theand
tags can be anything for the title and content. And you would change the number in showposts for how many you want to display. The li’s are also for styling.
Jeez! I have to add code now?? Thought it was something I could enable from the wordpress dashboard.
Anyway, if you don’t mind, can you please tell me where to place the code – what file and anything to watch out for? I wouldn’t want to mess up the site now… 
You can take a look at the site homepage here to see what I’m talking about – http://nigerianpolishinitiative-ng.org
Still working on it.
Thanks guys! 
- Has been a member for 2-3 years
- Exclusive Author
- Sold between 100 and 1 000 dollars
- Bought between 10 and 49 items
- Europe
- Referred between 100 and 199 users
If coding it looks too complicated, you can try Justin Tadlock’s Query Posts Widget plugin
@digitalimpact,
I downloaded and installed the plugin but it came in the form of a widget for my sidebar and my sidebar already has something like that.
WHat I want is something to make my HOMEPAGE display recent posts. 
- Has been a member for 2-3 years
- Exclusive Author
- Sold between 100 and 1 000 dollars
- Bought between 10 and 49 items
- Europe
- Referred between 100 and 199 users
@digitalimpact,I downloaded and installed the plugin but it came in the form of a widget for my sidebar and my sidebar already has something like that.
WHat I want is something to make my HOMEPAGE display recent posts.![]()
Oh…well, in that case, as someone said above… WP already shows the last posts you wrote on your homepage by default… or is it something else (can you show us an example on some site, ‘cause I really don’t understand…)?
Um, something is very fishy here, that website he linked to is at best I can tell a scam. His only blog post is garbled and would appear to have been create for SEO purposes.
The “UN” and “EU” logos at the bottom link to some webs design company, and the site claims to have been developed with the help of the UN.
@Warll,
I know WP normally should display recent posts on the homepage by default but mine isn’t (WP 2.9.2). You can see the homepage for yourself here: http://nigerianpolishinitiative-ng.org
Any tips please?
Um, something is very fishy here, that website he linked to is at best I can tell a scam. His only blog post is garbled and would appear to have been create for SEO purposes. The “UN” and “EU” logos at the bottom link to some webs design company, and the site claims to have been developed with the help of the UN.
Its no scam, ok. The content for the site will be populated by the NGO handling the project (Most of whats curently on it is dummy content we placed there).
I’m the designer handling the project and I’m trying to tidy up this project.
And as for the footer images that link to our site, I’m wondering how that’s possible. I just checked dynamic contents in the WP dashboard now and there’s no hyperlink in the code used there. Our only liinkback/credit from that site is already there on the left.
