i made an exemple with paint :
[URL=http://www.hostingpics.net/viewer.php?id=808813newhomepage.png][IMG]http://img11.hostingpics.net/pics/808813newhomepage.png[/IMG][/URL]
It would be to display the 3 last post on every category on the home page.
If you don’t want to build this because you don’t have enaugh time, would you please give me the PHP Code to display the 3 last post of a specified categorie ?
Then i’ll just have to do the html/css.
Thank you.
Hello,
the custom homepage template currently shows the last 2 posts from all categories. This is the code:
$the_query = new WP_Query(array(
'cat' => $recent_cat,
'showposts' => 2,
'post__not_in' => get_option("sticky_posts"),
));
Change the cat and showposts amount to what you want to show.
And how to choose to only display the image et the title of the post ?
thank you
Okay, i succeeded !
But i have only last isue.
I can’t chose the category of posts i want to display
$the_query = new WP_Query(array(
‘cat’ => ‘actu-geek’,
‘showposts’ => 2,
‘post__not_in’ => get_option(“sticky_posts”),
));
$the_query = new WP_Query(array(
‘cat’ => ‘culture-geek’,
‘showposts’ => 2,
‘post__not_in’ => get_option(“sticky_posts”),
));
$the_query = new WP_Query(array(
‘cat’ => ‘tutoriels’,
‘showposts’ => 2,
‘post__not_in’ => get_option(“sticky_posts”),
));
They display all the same 3 last posts…
Hello,
try adding the category id rather than the category name.
I would like to remove the posts from the custom home page template, and replace it with additional text, rather than posts, but I can’t figure out how to do that.
hello,
I have answered your question on your thread regarding this.