Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1309938
    pablo102
    Participant

    Hi,
    I’m looking for a help regarding one of my pages. I’m using the template (Content Left, Sidebar Right) but can’t get the sidebar to appear.
    Here is the site in question:
    https://idophotographydungarvan.ie/shop/

    Thanks!

    #1309939
    pablo102
    Participant
    This reply has been marked as private.
    #1309974
    Joao
    Moderator

    Hi There,

    Go to Appereance Customizer Layout and design and choose Content Left, Sidebar Right

    On the pages you dont want a sidebar > Click edit page on your top admin bar > Once you are on your WordPress Classic Backend Editor , under the blue update button you will find > Page Attributes > Page templates > Select : Blank No Container Header Footer.

    hope it helps

    Joao

    #1310222
    pablo102
    Participant

    is there any other way? I don’t want the side panel on any other page, just this one so it would mean checking and changing every single page on my website as I believe they are mostly set to “default”.

    #1310272
    Joao
    Moderator

    Hi Pablo,

    The other way would be fairly more complicated.

    U recommend you taking the suggestion above, it is not really hard and does not require much time or template changes.

    Thanks

    Joao

    #1310362
    pablo102
    Participant

    Will that change my portfolio items layout, as there is no option to change any portfolio pages? I would like them to stay the way they are.

    #1310724
    Rad
    Moderator

    Hi there,

    I assume you wish to implement sidebar for shop and product page only? If yes, please add this code to your child theme’s functions.php

    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-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_page_template( 'template-layout-content-sidebar.php' ) ) {
            $layout = 'content-sidebar';
          } elseif ( is_page_template( 'template-layout-sidebar-content.php' ) ) {
            $layout = 'sidebar-content';
          } elseif ( x_is_product() || x_is_shop() ) {
            $layout = 'content-sidebar';
          }
    
        return $layout;
    
      }

    This should override the global layout.

    Cheers!

    #1311025
    pablo102
    Participant

    Thank you,
    it works great!

    #1311371
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! We appreciate for letting us know that it has worked out for you.
    If you have anything else that we can help you with, please create a separate post.

    Best Regards.

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