WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Expand & Collapse Widgets (5 posts)

  1. talie2
    Member
    Posted 5 years ago #

    I'd like to be able to add a function to my widgets to allow the user to expand or hide them, something like a button in the corner (or a plus/minus symbol or something) that when the user clicks on it it changes the state of that particular widget to open/closed.

    I haven't been able to find anything that does this - that's not to say it's not out there, I'd love to think that it is because that would be a simple solution, otherwise, is it something someone could offer me some advice on?

  2. MichaelH
    Member
    Posted 5 years ago #

  3. talie2
    Member
    Posted 5 years ago #

    Yes! That's exactly what I'm looking for - unfortunately it's not working for me, installation goes ok, I set up a couple of widgets on the tabbed widget page and then add those to my sidebar but they're all in open state and clicking on them does nothing :(

  4. talie2
    Member
    Posted 5 years ago #

    Found the solution - needed to change some code in my functions.php template file to

    'before_widget' => '<li id="%1$s" class="widget %2$s">',

  5. michaelpark
    Member
    Posted 5 years ago #

    Which functions.php?

Topic Closed

This topic has been closed to new replies.

About this Topic