WordPress.org

Ready to get started?Download WordPress

Forums

what does this code mean? (3 posts)

  1. TomJohnson
    Member
    Posted 4 years ago #

    In the register_sidebar function reference, the li id name is %1$s and the class is %2$s. Example:

    register_sidebar(array('name'=>'Sidebar Contact','before_widget' => '<div class="widgy"><li id="%1$s"class="widget %2$s">','after_widget' => '</div>','before_title' => '<h2 class="widgettitle">','after_title' => '</h2>',));

    Does the %1$s and %2$s show the class of the widget with a special name, or what? I couldn't find a description of what this code does. Thanks,

    Tom

  2. jonradio
    Member
    Posted 4 years ago #

    Looking at the actual code, the comment preceding it says:

    Substitute HTML id and class attributes into before_widget

  3. TomJohnson
    Member
    Posted 4 years ago #

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic