WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way (a common one) to duplicate and change a theme widget ?

I'm asking this because, I have this widget that displays the recent news and if we click, it will display ALL news, but I wish to create a new widget that lists the latest articles (posts with a category "articles"), and if we click, that lists ALL articles.

Is there any widget like this that someone knows about ? If not, where should I look at in order to duplicate and change a theme widget ?

Thanks a lot

share|improve this question
up vote 2 down vote accepted

Widgets extend the Widget Class, search in the theme code for a class that extends WP_Widget. Copy/Paste it, rename it, and change what you'd like.

You can also look in the file wp-includes/default-widgets.php and use one of those as a starting point.

share|improve this answer
thanks a lot. I'm just looking at it. ;) – MEM Jun 19 '11 at 17:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.