The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Custom ids for <li> in widgetized sidebar? (1 post)

  1. freese
    Posted 7 years ago #

    I created a custom theme for the company I work for. The sidebar did not have to be "widgetized" or widgets "compatible" until now. I´m required to use a couple of widgets. I know how to widgetize the sidebar:

    Included the usual snippet:

    <?php 	/* Widgetized sidebar, if you have the plugin installed. */
    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>

    into sidebar.php and this code in the functions.php:

    if ( function_exists('register_sidebar') )
    		'before_widget' => '<li id="%1$s" class="widget %2$s">',
    		'after_widget' => '</li>',
    		'before_title' => '<h2>',
    		'after_title' => '</h2>',

    The sidebar is widgetized but the problem now is that all my carefully created ids for the different
    <li> are gone (some
    <li> elements require different styles and since the blog has to work with IE6 and e.g. child selectors are not supported by IE, I need this IDs to reference the different elements).
    I could try to rewrite my css again, but isn´t there a way to widgetize the sidebar without wordpress using this non-semantic ids?

    Thank you!!

Topic Closed

This topic has been closed to new replies.

About this Topic