Viewing 9 replies - 1 through 9 (of 9 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you check whether you’ve added or missed out an extra <div> or </div> HTML element?

    Thread Starter Lanadearg

    (@lanadearg)

    Andrew, could you tell me in which folder it(html) located?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I’m referring to that same file you edited in relation to the tutorial you followed.

    Thread Starter Lanadearg

    (@lanadearg)

    Thanks, I’ll try it now

    Thread Starter Lanadearg

    (@lanadearg)

    Ok, with div seems everything in order. Any other idea?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Resolve the unclosed and stray errors thrown by the W3C Validator. Yes, there it is still saying you have a stray </div> element.

    Thread Starter Lanadearg

    (@lanadearg)

    This is widget area code, I think it’s no affect, without really don’t have div error

    <aside id="text-2" class="widget widget_text">			<div class="textwidget">   <a href="https://giftseshop.com/ " target="_blank" > Online shop </a>
     <a href="https://giftseshop.com/scarves-c-47.html "><img src="  https://giftseshop.com/blog/wp-content/uploads/2012/10/knit_scarf_neck_warmer_baner.jpg " title="Giftseshop.com"/>
     <a href=" https://giftseshop.com/baby-hats-headbands-c-56.html "><img src="https://giftseshop.com/blog/wp-content/uploads/2012/10/il_570xn.347090121z.jpg" title="Giftseshop.com"/>  </div>
    		</aside><aside id="text-3" class="widget widget_text"><h3 class="widget-title">Subscribe to RSS feed</h3>			<div class="textwidget">  <a href="https://giftseshop.com/blog/feed/" ><img src=" https://giftseshop.com/blog/wp-content/uploads/2013/01/index.jpg " ></a></div>

    Please, another idea?

    my tutorial is based on creating and using a child theme of Twenty Eleven.

    because you are editing the theme directly, you might have missed the essential step of adding the filter code to functions.php (of the child theme) to remove the .singular body_class for single posts and static pages.

    if editing the Twenty Eleven theme directly, you need to edit this section at the end of functions.php (shown with the changes already incorporated):

    function twentyeleven_body_classes( $classes ) {
    
    	if ( function_exists( 'is_multi_author' ) && ! is_multi_author() )
    		$classes[] = 'single-author';
    
    	if ( is_singular() && ! is_single() && ! is_page() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) )
    		$classes[] = 'singular';
    
    	return $classes;
    }
    add_filter( 'body_class', 'twentyeleven_body_classes' );
    Thread Starter Lanadearg

    (@lanadearg)

    I had the filter code in functions.php. But my code was a little different.
    I replaced by your code and it works now!
    Thank you! Thank you мery match!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Twenty eleven sidebar under single post’ is closed to new replies.