• Hello,

    The theme I have uses dynamic sidebar and does not use the register_sidebar() function anywhere. How can I add unique IDs to each widget using the dynamic sidebar? Do I have to edit the theme and manually place all new registered sidebars?

    The theme utilizes a sidebar.php file that contains:

    <?php if ( function_exists('dynamic_sidebar') ) dynamic_sidebar('Sidebar'); ?>

    The theme file then places a sidebar like this:

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar: Homepage (Right)') ) echo '&nbsp;'; ?>

    Any help is appreciated. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • does not use the register_sidebar() function anywhere

    unlikely; have you searched all theme templates including any sub folders?

    what theme is that?
    where did you download the theme from?

    Thread Starter B & L Marketing

    (@unifiedac)

    I looked. I can’t find it anywhere. It’s a free theme from WPZoom:

    http://www.wpzoom.com/themes/academica/

    there are more templates in the theme than you can access from within the dashboard – appearance – editor; you will need to use FTP to search and edit the files; or search and edit them local on your computer, then upload teh edited files.

    for example, the sidebar ragistering is in /functions/theme/sidebar.php

    if you need more information, you will need to contact wpzoom for support, as this forum here only fully supports themes from http://wordpress.org/themes/

    Thread Starter B & L Marketing

    (@unifiedac)

    Thanks, but that’s the same information I provided in my original post. The sidebar.php does not use the register_sidebar() function explicitly, only through the dynamic_sidebar() function. Therefore, I am unable to set the before_widget element as I could with the register_sidebar() function.

    My question is I have to rebuild the sidebars with the register_sidebar() function so I can create unique HTML IDs for my widgets.

    I’m sorry but as you are using a non-WPORG theme, you need to seek support from the theme’s developers – paid or otherwise. We only support themes downloaded from wordpress.org here.

    I’m asking for support with the interchange between dynamic_sidebar() and register_sidebar(). This topic is relevant to any theme.

    nope – the problem is caused specifically by your theme.

    The sidebar.php does not ….

    you are looking at the wrong sidebar.php file;

    there is more than one in your theme; I posted the path to the sidebar.php which indeed does use ‘regster_sidebar’ – it is in a subfolder in the theme’s files.

    here is the path again (a bit longer so you can see where it relates to):

    /wp-content/themes/academica/functions/theme/sidebar.php

    you will need to use FTP to access it.

    Thread Starter B & L Marketing

    (@unifiedac)

    I see. Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add Widget IDs with Dynamic Sidebar’ is closed to new replies.