Elliot Swan says:
And when in doubt, http://codex.wordpress.org is a great resource for stuff like this.
Yes. Thanks for adding the reference that I’ve left out.
Or you can ask the rest of us peeps down at the #wordpress channel at irc.freenode.net. We’re nice and friendly.
Wow, I never know that there’s a wordpress channel in IRC! Good.
Great! I used it on my site
szehau weblog - Life, Internet, Online Revenue, Softwares, Gadgets and Programming Experience » Blog Archive » Recent Wordpress Posts in Sidebar says:
[...] I had tried out the code Recent WordPress Post in Sidebar suggested by EngLee. Although the code did shows the recent posts correctly but some functions (eg: is_page() and is_home() are not working properly when it is after the portion of the code. My guess is the wordpress loop in the code modified value of some global variables. [...]
Nice site. Thank to work…
thanks for the code.. worked great on my blog!
Hey right on! I’ve tried a plugin and a few suggestions, but the plugin created a formatting gap on the sidebar. Your code did the trick and it works…thanks very much for sharing it!
will amato says:
Worked like a charm.
A million thanks from this WP newbie.
Chris Coyier says:
Very useful. Thanks man.
Net Writing » Improvements to Sidebar - Wordpress Blog says:
[...] Thanks to Erii for this code: eri’s wordpress blog [...]
Thanks for the code and tip!
Jason Liebe says:
Chris Sainsbury says:
Great code snippet mate! Really useful, thanks
works wonderfully, thank you.
thanks, it worked great for me as well on the newest version of wordpress (2.2.1)
Bas Timmers says:
Just one question. I would like to show the last x posts minus the last one. How can I do that?
Do you mean you don’t want the last post?
The easiest way I can think of, is to use PHP to skip the first one, then show the others. So, you need to query 11 posts if you want to show 10.
It works, thanks. Gonna apply this on my blog now
This did not work!! All my links (to pages and posts stopped working!!
What could be wrong?
Thanks! It works!
The Dumber Man says:
Lovely simple code man, works brilliantly, needed to edit a little bit of it to get it to work as i wanted but it worked. Cheers dude
You are a god, been trying to get this to work on my blog for hours a quick copy paste and it all works!
Frances Palaschuk says:
Worked like a charm, thanks a million!!!
Thanks! This is just what I been searching for!
You can also just write this:
… the code disappered in my comment, so here we go again (remember the PHP tags):
I think your way should work. There are many different ways to do it.
Anyway, that’s how I did it in year 2005. WordPress added lots of different functions along the way.
hi, you know this is not efficient.
if you use loop like that in sidebar it effects
the page loop too.
showposts=10 in sidebar and page will 10 posts too.
if this showposts=5 page will 5 posts too.
I think this will be more appropriate
I think this is it
I couldn’t publish the code
In the theme that I use, I am including the sidebar before I include the post content. Your piece of code does not work when I include the sidebar before the post content.
Do you have any idea what code I can use in my situation?
- Thanks if you can help me out here
Very nice. Me too, dont like plugins if there can be a few lines of code. Thank you for it.
How to make it so that it only shows posts for X category?
hey man.. thanks… u just made my day…
How To’s — Add recent posts to Wordpress sidebar says:
[...] Many thanks to Eng Lee for posting this code on his blog. [...]
How do you show the most recent posts from a certain category? I have three main categories and want to show recent posts from category A, B and C in separate boxes.
Thanks dude for the code. Highly appreciate it.
Thanks for the code, worked like a charm!
Accounting Teacher says:
You said code should be added in sidebar.php. But at what poit? At the start or end?