Widget compatibility problem with Polylang ?
-
hi everyone,
i installed polylang and it works perfectly, very efficient and easy to use. i used it in a sidebar as a widget, using the wordpress “recent post” widget in the same sidebar. the problem is that the second plugin, “recent post”, disappears when i swith from the main language (french) to the second one (english)… i’ve tried to use another widget for the recent post, but it disappears too. it appears that whatever is the plugin, it disappears when i switch from main language to second one…
notice that i’m using a secondary sidebar, which is not implemented in the theme i choose (twenty twelve) and i had to insert this code into function.php :‘// Voodoo Registration Bar
// FIRST WE NEED TO REGISTER THE WIDGET AREA
// ADVERTISING SIDEBAR
function voodoo_widgets_init() {
register_sidebar( array(
‘name’ => __( ‘Header widget area’, ‘twentytwelve’ ),
‘id’ => ‘voodoo-ad-widget-area’,
‘description’ => __( ‘Horizontal Ad Widget’, ‘twentytwelve’ ),
‘before_widget’ => ‘<aside id=”%1$s” class=”top-widget %2$s”>’,
‘after_widget’ => ‘</aside>’,
‘before_title’ => ‘<h3 class=”widget-title”>’,
‘after_title’ => ‘</h3>’,
) );
}
/** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */
add_action( ‘widgets_init’, ‘voodoo_widgets_init’ );function voodoo_top_bar() { ?>
<div id=”voodoo-top-bar” class=”widget”>
<?php if ( is_active_sidebar( ‘voodoo-ad-widget-area’ ) ) : ?>
<div class=”ad-widget-area”>
<?php dynamic_sidebar( ‘voodoo-ad-widget-area’ ); ?>
</div><!– .voodoo-ad-widget-area –>
<?php endif; ?>
<div class=”clear”></div>
</div>
<?php }`and this one in my main template page :
‘<?php if ( function_exists( ‘voodoo_top_bar’ ) ) {
voodoo_top_bar();
} ?>’thanks in advance for your answers, i hope someone can help me.
and sorry for my english… 🙁
The topic ‘Widget compatibility problem with Polylang ?’ is closed to new replies.