WordPress.org

Ready to get started?Download WordPress

Forums

widget ID ? (3 posts)

  1. digitalnature
    Member
    Posted 4 years ago #

    is there any way I can get the widget instance ID from inside the widget class?

    I tried $id, but it outputs the widget container id (eg. "sidebar-1")

  2. digitalnature
    Member
    Posted 4 years ago #

    found it.

    $args['widget_id']

  3. Stephen Pickett
    Member
    Posted 4 years ago #

    This seriously came in handy for "AJAX-ifying" my widget without breaking it's ability to have multiple instances! Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags