• Hi, I’m looking for a way for a widget to know what dynamic sidebar it is in.

    That’s it really. A line of code I pop into a widget to tell me what the name of the sidebar is.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Have you reviewed the Widgets_API? is active sidebar() looks potentially useful.

    Thread Starter minkowski

    (@minkowski)

    I did and I tried that, it only tells me if a sidebar has active widgets and doesn’t return any different response depending on which sidebar the widget is placed.

    I’ve actually changed my tactic regarding this anyway. I was building an announcement system in a rather quick and hacky way and have changed it to a different quick and hacky way.

    Still, would be interested to know if this is possible for the future.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Which sidebar a widget is in?’ is closed to new replies.