• within the sidebar.php file the anything between the following tags is not ‘printed’ onto the page while the rest of the sidebar.php is

    <?php if ( !function_exists(‘dynamic_sidebar’)
    || !dynamic_sidebar() ) : ?>

    <!– blah blah blah –>

    <?php endif; ?>

    could someone point me in the right direction?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Blah blah blah is not printed?

    Thread Starter nyceducrats

    (@nyceducrats)

    That is correct.

    I’m starting to think it’s something that is going on in the header part of the code because this works for a different theme.

    It is currently being commented out by the tags either side of it. Remove the <!-- --> and it should show.

    Thread Starter nyceducrats

    (@nyceducrats)

    Thank you for the reply. I did that just to make things more simple (I should have known I would somehow screw it up)! Here is what is in the sidebar.php :

    <div class=”sidebar”>

      <!– 1 –>

      <?php if ( !function_exists(‘dynamic_sidebar’)
      || !dynamic_sidebar() ) : ?>

      <!– 2 –>

      <li class=”side-header”>

      <li class=”side-back”>
      <h2><?php _e(‘Archives’,’simpson’); ?></h2>

      <?php wp_get_archives(‘type=monthly’); ?>

    <li class=”side-footer”>

    <!– 3 –>

    <?php endif; ?>

    <!– 4 –>

    <!– 5 –>

    </div>

    and here is what gets published/printed to the page:

    <div class=”sidebar”>

      <!– 1 –>

      <li id=”archives” class=”widget widget_archives”><h2 class=”widgettitle”>Archives</h2>

    <!– 4 –>

    <!– 5 –>

    </div>

    If I simply remove the

    <?php if ( !function_exists(‘dynamic_sidebar’)
    || !dynamic_sidebar() ) : ?>

    tag and it’s closer the site prints as anticipated/desired. Am I allowed to simply remove the ?php if tag and what bad things might happen if I do?

    Thanks so much for the support,
    Kurt

    I am not 100% sure what you are trying to gain but if you feel you are getting the result you want by removing the dynamic sidebar, just go for it. You should also move the <?php endif; ?> at the same time though.

    Thread Starter nyceducrats

    (@nyceducrats)

    When the coding between the

    <?php if ( !function_exists(‘dynamic_sidebar’)
    || !dynamic_sidebar() ) : ?>

    and

    <?php endif; ?>

    get left out the style of the widgets gets lost.

    The problem is that if I remove this coding then the widgets I add or remove from the page will have to be written into the coding of sidebar.php instead of controlled by the administrative files.

    I might go this route since I can’t figure out why the above code works with one theme and not with another????

    Thanks again for the replies.

    I probably have not explained this too well. You need the code to display the widgets.

    If you take it out you need to revert to manual implementation of your plugin code.

    Have a read through the following. It will help 🙂

    http://automattic.com/code/widgets/themes/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘dynamic sidebar not recognized??’ is closed to new replies.