ThemeShaper Forums » Thematic

[closed]

function syntax error?

(3 posts)
  • Started 2 years ago by PitaMaria
  • Latest reply from PitaMaria
  • This topic is resolved
  1. PitaMaria
    Member

    I'm getting validation errors around a widget I added via a new function. I forgot where I got the function code but I'm including it below. I think it's kicking out a
    <li> and a <div> that aren't closing properly. For an example of the elements in action go to http://parkhillvet.com/resources/new-patients/. Any help diagnosing the problem would be greatly appreciated.

    function my_header_widgets() {
    if ( function_exists('dynamic_sidebar') && is_sidebar_active('header-aside') ) {
        echo '<div id="header-aside" class="aside">'. "\n" . '<ul class="xoxo">' . "\n";
        dynamic_sidebar('header-aside');
        echo '' . "\n" . '</div><!-- #header-aside .aside -->'. "\n";
    }
    }
    add_action('thematic_header', 'my_header_widgets', 8);
    Posted 2 years ago #
  2. Looks like you are not closing your unordered list. Change the 5th line to:

    echo '' . "\n" . '</ul></div><!-- #header-aside .aside -->'. "\n";

    -Jeff

    Posted 2 years ago #
  3. PitaMaria
    Member

    @diverge: Thanks!

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.