[resolved] Widget content populating outside of widget container (3 posts)

  1. shagen
    Posted 3 years ago #

    I recently was working on a theme in which I added two new widget areas of which I plan on using for WP Menu areas. I have wrapped the widget areas each in a right and left container as I would like it to be a 2 column type layout within the bottom right hand side of the footer. I then wrote in the code to call each widget area like so...

    <div id="leftMenuContainer">
    	<?php if (!dynamic_sidebar('footer-menu-left-col')) : ?>
    		<?php endif; ?>
    	<div id="rightMenuContainer">
    	<?php if (!dynamic_sidebar('footer-menu-right-col')) : ?>
    		<?php endif; ?>

    Here are the functions...

    [code moderated - use the pastebin for any code over the forum limit of 10 lines]

    So why would the page generate the one of the footer-menu divs outside of thed left container DIV like this... (also view live here... clvr.com)

    [code moderated - the link is enough to show the code, or use the pastebin]

    Where have I gone wrong. My eyes are failing me it seems as I have done this many times in the past with no issues. I cannot determine why the second menu that I have put in the widget area is populating outside of the original widget area. Any help is appreciated. Obviously I don't have it correct.

    Thanks for your time!

  2. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

    is there a deeper purpose behind that you are opening one div before the widget, but are closing two after it?

    'before_widget' => '<div id="footer-menu">',
    	'after_widget' => '</div></div>',
  3. shagen
    Posted 3 years ago #

    I appreciate you taking the time to take a look. Apparently my eyes were deceiving me after staring at the screen for too long. Extra closing DIV was the issue. Sorry for spending your time on something super simple. That was the issue. Lesson learned: Always check, re-check and re-check again for simple errors.

    This one is resolved!
    Thanks again

Topic Closed

This topic has been closed to new replies.

About this Topic