Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1105818
    intelektual
    Participant

    Hello, please help πŸ™‚
    1) I would like to have a sidebar in a portfolio item detail page (e.g. http://fototapetybrno.qwertydesign.com/fototapety/sto-tisic-zlutych-slunci/ – production site, not the final domain, still in progress)
    I have found this solution – https://community.theme.co/forums/topic/how-do-i-create-a-portfolio-item-sidebar/ but it does not work for me.
    I have Icon stack activated, child theme installed and running, added code to childΒ΄s functions.php file, changed line “$layout = ‘full-width’; /* LAYOUT FOR SINGLE PORTFOLIO PAGE */” to “$layout = ‘content-sidebar’; /* LAYOUT FOR SINGLE PORTFOLIO PAGE */”.
    Any ideas, please?

    2) would there be any solution to add sidebar into WooCommerce product detail page as well?

    Thanks very much in advance,
    Tom

    #1106028
    Nico
    Moderator

    Hi There,

    Thanks for writing in.

    1. Would you mind sharing us your FTP and admin credentials so we could check your customization why it is not working.

    Don’t forget to set it as private reply.

    Thanks.

    2. You can check link below for sidebar on product page.

    https://community.theme.co/forums/topic/add-sidebar-to-product-pages/
    https://community.theme.co/forums/topic/add-sidebar-to-single-product-page-woocommerce/

    Hope it helps.

    Let us know how it goes.

    Thanks.

    #1106051
    intelektual
    Participant
    This reply has been marked as private.
    #1106493
    Lely
    Moderator

    Hi Tom,

    Upon checking, the code is not added on your child theme’s functions.php file. I added the following code and the sidebar is now showing.

    
      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 = 'content-sidebar';
          } 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;
        }
    
        return $layout;
    
      }
    

    Hope this helps.

    #1106554
    intelektual
    Participant

    ahaaaaaaaaaaaaa πŸ™‚ πŸ™‚ I have pasted the code by mistake into the style.css file πŸ™‚ I am such a stupid, cannot understand why I did that πŸ™‚
    But thanks very much for your help, very appreciated!
    Tom

    #1106633
    Friech
    Moderator

    We’re delighted to assist you with this.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1105818 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>