Not show sidebar

Hi,

after upadate not showing sidebar left.
Function:

add_filter( 'ups_sidebar', 'x_woocommerce_sidebar' );
function x_woocommerce_sidebar($sidebar){
	if( is_product() || is_cart() || is_checkout() || x_is_product_category()){ //is_shop()  is_woocommerce() ||
		return 'ups-sidebar-woocommerce';
	}
	return $sidebar;
}
  function x_get_content_layout() {

    $content_layout = x_get_option( 'x_layout_content' );

    if ( $content_layout != 'full-width' ) {
      if ( is_home() ) {
        $opt    = x_get_option( 'x_blog_layout' );
        $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
      } elseif ( is_singular( 'post' ) ) {
        $meta   = get_post_meta( get_the_ID(), '_x_post_layout', true );
        $layout = ( $meta == 'on' ) ? 'full-width' : $content_layout;
      } elseif ( x_is_portfolio_item() ) {
        $layout = 'full-width';
      } elseif ( x_is_portfolio() ) {
        $meta   = get_post_meta( get_the_ID(), '_x_portfolio_layout', true );
        $layout = ( $meta == 'sidebar' ) ? $content_layout : $meta;
      } elseif ( is_page_template( 'template-layout-content-sidebar.php' ) ) {
        $layout = 'content-sidebar';
      } elseif ( is_page_template( 'template-layout-sidebar-content.php' ) ) {
        $layout = 'sidebar-content';
      } elseif ( is_page_template( 'template-layout-full-width.php' ) ) {
        $layout = 'full-width';
      } elseif ( is_archive() ) {
        if ( x_is_shop() || x_is_product_category() || x_is_product_tag() ) {
          $opt    = x_get_option( 'x_woocommerce_shop_layout_content' );
          $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
        } else {
          $opt    = x_get_option( 'x_archive_layout' );
          $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
        }
      } elseif ( x_is_product() ) {
        $layout = 'full-width';
      } elseif ( x_is_bbpress() ) {
        $opt    = x_get_option( 'x_bbpress_layout_content' );
        $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
      } elseif ( x_is_buddypress() ) {
        $opt    = x_get_option( 'x_buddypress_layout_content' );
        $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
      } elseif ( is_404() ) {
        $layout = 'full-width';
      } else {
        $layout = $content_layout;
      }
    } else {
      $layout = $content_layout;
    }

if( is_product() || is_cart() || is_checkout() || x_is_product_category()){ //is_woocommerce() || is_shop() ||
		return 'sidebar-content';
	}
    return $layout;
  }

Hi Teem,

Thanks for reaching out.

May I know which site has this issue? That shouldn’t be affected by any update if it’s added on a child theme, and should work if the child theme is active.

I also recommend checking Admin > Appearance > Sidebars if ups-sidebar-woocommerce is still there. And or check the Admin > Appearance > Widgets if the widgets for that sidebar are still there. If not then you’ll have to re-add them, but I like to clarify again that update can’t do that.

Thanks!

Ok I have it.

I not had correct setting widget in main sidebar but I don’t know why it happened.

Thanks.

Glad it’s working now, cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.