WordPress.org

Ready to get started?Download WordPress

Forums

Search WIdget - Add ID (2 posts)

  1. Stefanauss
    Member
    Posted 5 years ago #

    Hi everybody,

    i need to set an ID selector to the WordPress Search Widget in the sidebar.
    Currently, the search widget is the only one in the sidebar included just in a simple <li>[WIDGET CODE]</li>. I need it to be
    <li id="searchwidget">[WIDGET CODE]</li>. I took a look to widget.php but i didn't figure out what and where to modify. Maybe something in $before_widget?

    Thanks in advance =)

  2. renato_s
    Member
    Posted 5 years ago #

    Maybe you could try to set the before_widget contained in functions.php inside your theme folder. I think it'll do the trick without having to edit a core file.

Topic Closed

This topic has been closed to new replies.

About this Topic