• Skip to primary navigation
  • Skip to main content
  • Skip to footer
  • Home
  • About
  • My Blogs
    • Photoblog
    • Knots
    • WP.com tips
kristarella.com

kristarella.com

Happiness Engineer at Automattic, lover of knitting, crochet, sci-fi and more

  • Presentations
  • Plugins
    • Exifography
  • Contact
You are here: Home / Technology / Making an expandable links widget

Making an expandable links widget

27 August 2007 by kristarella

I’ve been trying to make a widget for wordpress, which produces a list of links (from the blogrolls created in the WP admin) that can be expanded and contracted by the reader.

I’ve used the javascript that makes it possible on this site before in previous templates, so I know that part of it works. I want to make this a widget in the form of a plugin because I don’t have to change too much of my template code, I’m using a widget sidebar and I could make it available for others. I’ve found this area to be lacking in WP widgets. I’ve found dropdown links that use dropdown boxes, but they use html forms for this, which I don’t want.

I found this set of tutorials useful, but due to my lack of PHP knowledge slightly above my head. I believe the parts of code that I got from the tutorial are working, but it still doesn’t work with the rest of the code I have.

The widget API was a small bit of help, but still things don’t work.

This movie about creating WP plugins was also very informative as a starting point, but again, not resulting in a complete working plugin.

The blogroll links plugin for dropdown links is great, except that it uses a form. I’d love to have a widget that operates in that same way to dynamically obtain the category IDs and create separate divs or uls for each link category. I’ve tried to apply the widget’s mechanism for doing that to my widget, but it isn’t working.

If you know anything about this sort of thing and want to help me out, leave a comment and I’ll email you the code. :sheepish:

Share this:

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X

Like this:

Like Loading…

Related

Filed Under: Technology, WordPress Tagged With: tools

Footer

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Categories

%d