That depends. Are you Bob? 🙂
If you only want your most recent post to show up on your page, then go to Admin > Settings > Reading and set “Blog pages show at most” to 1.
Thread Starter
kuipou
(@kuipou)
no i mean the php code for it and im not bob actually what i want to do is just display the last post of a specific category from a specific user via php
Sorry, that’s beyond me for now.
I’m thinking maybe something like this:
<?php query_posts(array(
'cat' => 4,
'author'=> 3,
'showposts'=> 1,
'order'=>'DESC',
));
?>
Where 4 = the number of the category
Where 3 = the number of the author
And where 1 = the number of posts to show
Read the link above for more usage information and where to put it on your page..
Also you can use the author name in query posts..
http://codex.ww.wp.xz.cn/Template_Tags/query_posts#Author_Parameters
Same with category, you can use the name if it’s preferred.
http://codex.ww.wp.xz.cn/Template_Tags/query_posts#Category_Parameters
You can proberly drop the …
'order'=>'DESC',
Since you’re only grabbing one post, it’s pointless having it there.
Also you need to drop off the , from the last item in the array… (last item of an array should not have one).