WordPress.org

Support

Support » How-To and Troubleshooting » Increment widget div style in functions.php

Increment widget div style in functions.php

  • I need to apply a new style for the second widget on each page. The first widget on a page will have one style and all additional widgets will have another. There should only be 2 on any page.

    The first widget: <div id=”firstWidget”>
    The second widget: <div id=”extraWidget”>

    Currently my functions.php file contains:
    if ( function_exists(‘register_sidebar’) )
    register_sidebar(array(
    ‘name’ => ‘Sidebar’,
    ‘before_widget’ => ‘<div id=”firstWidget”>’,
    ‘after_widget’ => ‘</div>’,
    ‘before_title’ => ‘<h2>’,
    ‘after_title’ => ‘</h2>’,
    ));

    I’ve seen users ask the same question but with no responce.
    http://wordpress.org/support/topic/increment-div-id-in-functionsphp-or-else-?replies=1

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Increment widget div style in functions.php’ is closed to new replies.
Skip to toolbar