WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

I need to show a list of links, similar to what "Bookmarks" widget does.

But Bookmarks widget is not suitable, because I need to display links (with removed "http://") instead of titles and also images of a custom size. Bookmarks widget seems not to being able to do this.

As such, I want to code it in PHP.

My question: How to enumerate all links of a specified category?

share|improve this question

Recycle the core

You could simply take the widgets code from core 1), rename the class and such and alter it to your needs. OR you could simply extend the core widget class and just alter what you need changed (overwrite the methods in your extending Widget class).

Than add a plugin comment on top and activate it.

 * Plugin Name: Custom Link Widget
 * Description: Altered from WP Core.
 * Version:     0.1
 * Required:    3.3
 * Author:      Your Name <mail@example.com>
 * Author URI:  http://example.com
 * License:     MIT
 * License URI: http://www.opensource.org/licenses/mit-license.php

1) The core widget you can find here.

share|improve this answer
This could probably be used to solve your other problem: wordpress.stackexchange.com/questions/44903/… – Stephen Harris Mar 8 '12 at 15:30

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.