WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Default dynamic sidebar code invalidating my page (3 posts)

  1. synchole
    Member
    Posted 3 years ago #

    Hi,
    I recently added a dynamic sidebar to my company's website (centurionsystems.com) in order to put the qtranslate widget I'm using in the sidebar and not in the footer where it was being lost. I added a text widget as well to make it even clearer what the widget does. However, adding this makes my code invalid. I get these errors:
    …" class="widget-container widget_text"><h3 class="widget-title">Change Languag… Element li not allowed as child of element div in this context. (Suppressing further errors from this subtree.)

    So it's having difficulty with this:

    <li id="text-3" class="widget-container widget_text"><h3 class="widget-title">Change Language</h3>
    <div class="textwidget"><p>To View this site in another language, please use the drop down menu below.</p>
      199</div>

    But since I'm only using this in my code:

    <?php if ( ! dynamic_sidebar( 'secondary-widget-area' ) ) : ?>
    		<?php endif; // end primary widget area ?>
    		</div><!-- #secondary .widget-area -->

    I honestly don't know how to fix this issue.
    Any help is greatly appreciated.

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Try amending the markup being used with your widgets in functions.php. You need to look at the register_sidebar function.

  3. synchole
    Member
    Posted 3 years ago #

    Brilliant! Thank-you!

Topic Closed

This topic has been closed to new replies.

About this Topic