• 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:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on Pocket (Opens in new window) Pocket

Like this:

Like Loading...

Related

Filed Under: Technology, WordPress Tagged With: tools

A triptych of baubles. These are very satisfying t A triptych of baubles. These are very satisfying to paint ❤️💚💙

#watercolor #watercolour #christmas
I have really enjoyed this Christmassy painting! S I have really enjoyed this Christmassy painting! So glad my friend asked me to make some cards for our church helpers, because it set me on a roll!
#watercolor #watercolour #christmas #christmascards #watercolorcards
Had a great Saturday at the GKR Karate State Title Had a great Saturday at the GKR Karate State Titles! I was a sub for @jamesxuereb.me in the Blue Flame Dragons thanks to his sprained ankle; we won first round and came fourth overall!
I did a bunch of judging and officiating, which was really good.
I didn’t place in my individual events, but had a very fun final round of kumite (sparring).

#gkrkarate #karate
More stamping tonight. Even better than last night More stamping tonight. Even better than last night’s!
Did some stamping this evening. Love it! I wish I’d done some pages in other ink colours before I dismantled the stamps 😂
Had an appointment in the city, so I got to visit Had an appointment in the city, so I got to visit the @legocertifiedstores_anz Wicked display!
#wicked #lego #afol #sydney
A little book I made from Bunnings paint sample ca A little book I made from Bunnings paint sample cards. It’s going to be for mini paintings and collages. Sometimes it’s nice to start with a colour rather than a blank white page!
A little while ago I did some swatching of Daniel A little while ago I did some swatching of Daniel Smith and Schminke Horodam watercolours. So soothing! I love some of the granulating colours!
#watercolours
Follow on Instagram

Footer

Subscribe to Blog via Email

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

Top Posts & Pages

  • Home
    Home
  • Wooden yarn swift
    Wooden yarn swift
  • Edit EPS files in Inkscape on Mac
    Edit EPS files in Inkscape on Mac

Follow Me On…

  • Instagram
  • X
  • GitHub
  • LinkedIn
  • YouTube

Categories

Copyright © 2025 · Kristen Symonds · kristarella.com

%d