mortykai
Forum Replies Created
-
That led let to the problem. The echo $after_widget was actually inside the else if{} for Space Gallery type. When I moved it one line below, it works fine now. Thanks for you help. I trust you will fix this in the next update.
Sorry, I don’t understand.
Yes, the aside tags come from the theme which is here in the theme’s functions.php:
register_sidebar(
array(
‘name’ => __( ‘Main Sidebar’, ‘twentytwelve’ ),
‘id’ => ‘sidebar-1’,
‘description’ => __( ‘Appears on posts and pages except the optional Front Page template, which has its own widgets’, ‘twentytwelve’ ),
‘before_widget’ => ‘<aside id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</aside>’,
‘before_title’ => ‘<h3 class=”widget-title”>’,
‘after_title’ => ‘</h3>’,
)
);Your WP_Widget class’s Widget function is supposed to echo the before_widget, after_widget, etc.
your Total-Soft-Gallery-Widget.php line 58 has:
echo $before_widget;
this outputs the opening aside.line 13668 has:
echo $after_widget;
this outputs the closing aside but it is not happening.If you look at the page source you will see within the <div id=”secondary”> there are two child asides when there should be six. The other four are contained in the gallery video aside.
All the widgets do appear on the page and are working however this is adversely affecting CSS. It is also producing invalid HTML as the closing tag is missing.
Thanks again for your prompt attention.
Hi, Thanks for prompt reply.
Your widget renders as:
<aside id=”total_soft_gallery_video-2″ class=”widget widget_total_soft_gallery_video”>
… <- your widget code
<- closing </aside> is missing<aside id=”media_image-6″ class=”widget widget_media_image”></aside> <- next widget appears here.
Link to page:
http://d5c.6a3.myftpupload.com