Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1182960
    simonkneafsey
    Participant

    Hi,

    I am working with Woocommerce and a ticketing plugin (Tickera).

    The plugin does not allow me to control the sidebar visibility and positioning on product/event pages (Page Attributes section does not appear).

    I need sidebars hidden on all woocommerce pages. e.g. https://www.thekanbanmaster.co.uk/events/kanban-systems-design-kmp-i-course-london-19-20th-january-2017

    Therefore I need to default the sidebars to off for my site and then turn them on for the few other (non woocommerce) pages where I need them, eg my About page (https://www.thekanbanmaster.co.uk/about/).

    I have the following customisations set currently:

    Layout and Design — Content Layout = Fullwidth
    WooCommerce — Content Layout = Fullwidth
    About page — Page Attributes — Template — Content Left, Sidbar right

    But the sidebar still does not appear on my About page (https://www.thekanbanmaster.co.uk/about/) and it remains full width/

    Please help!

    Simon

    #1182961
    simonkneafsey
    Participant
    This reply has been marked as private.
    #1182967
    Christian
    Moderator

    Hey there,

    You should choose a layout with sidebar. You can still use Fullwidth for WooCommerce in Appearance > Customize > WooCommerce. You will then be able to use a sidebar with page template.

    Thanks.

    #1183069
    simonkneafsey
    Participant

    FYI – I need my event pages to be 1 column and standard blog posts to be 2 column

    #1183092
    Joao
    Moderator

    Hi Simon,

    To Change your blog to two columns, go to Appereance > Customizer > Blog and change to 2 columns instead of 3.

    Upon checking https://www.thekanbanmaster.co.uk/events/

    It is already in one column.

    Please let us know if you need further help

    Thanks

    Joao

    #1183325
    simonkneafsey
    Participant

    Hi,

    I may have still been working on this when you looked. I will stay off it now.

    The problem still exists. I need:
    Blog home page = 3 column
    Blog post page = 2 column (Currently is 1 column!)
    Standard Page = 2 column (Currently is 1 column!)
    Event page = 1 column

    For example:
    Blog home page – https://www.thekanbanmaster.co.uk/blog/
    Currently 3 column which is OK

    Blog post page – https://www.thekanbanmaster.co.uk/kanban/my-favourite-kanban-books/
    Currently 1 column, needs to be 2 column

    Standard Page – https://www.thekanbanmaster.co.uk/about/
    Currently 1 column, needs to be 2 column

    Event page – https://www.thekanbanmaster.co.uk/events/kanban-systems-design-kmp-i-course-london-19-20th-january-2017
    Currently 1 column which is OK

    Please take another look and advise.

    #1184009
    Friech
    Moderator

    Hi There,

    for the Standard Page, is the second column is for sidebar or for a content as well? If it is for a sidebar please use the Default page template instead (http://prnt.sc/ckg6qs). If it is for a content, make your column layout a two column (http://prnt.sc/ckg7eu).

    For the Blog post pages, navigate to Customizer > Layout and Design set the Content Layout to Content Left, Sidebar Right. Then add this on your Custom CSS.

    .blog .x-main {width: 100%;}
    .blog .x-sidebar {display: none;}

    Hope it helps, Cheers!

    #1184411
    simonkneafsey
    Participant

    I think we are heading in the right direction, but this has not solved my issue still.

    I will try and explain more clearly. The pages I have issues with is where I cannot get the sidebar to appear with my current setup, where I have had to set layouts to full width to get this far.

    Blog post page – E.g. https://www.thekanbanmaster.co.uk/kanban/my-favourite-kanban-books/
    Currently 1 column, needs to be 2 column – Main content + sidebar
    BUT, other type of post page, an event page in this case, needs to remain as 1 column. For example:
    https://www.thekanbanmaster.co.uk/events/kanban-systems-design-kmp-i-course-london-19-20th-january-2017

    Standard Page – https://www.thekanbanmaster.co.uk/about/
    Currently 1 column, needs to be 2 column – Main content + sidebar

    #1184465
    Paul R
    Moderator

    Hi,

    To achieve all that, you can add this in your child theme’s functions.php file.

    
    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_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';
          }
          
          if ( is_singular( 'post' ) ) {
         $layout = 'content-sidebar';
          } 
         
        
        return $layout;
    
      }
    

    For pages, you can change the layout under page attributes.

    Hope that helps.

    #1185000
    simonkneafsey
    Participant

    Thank you. Getting closer but still not quite there.

    I have adjusted the relevant layout settings, but my event pages are still 2 column (content and sidebar). I need them to be 1 column (content). Normal blog post pages need to remain 2 column.

    E.g. Event page
    https://www.thekanbanmaster.co.uk/events/kanban-systems-design-kmp-i-course-london-19-20th-january-2017

    These Event posts are from myplugin (Tickera) and are pseudo blog pages I believe, hence the problem I am having.

    #1185434
    Friech
    Moderator

    Hi There,

    Please add this on your custom CSS on Customizer.

    body.single-tc_events .x-main {width: 100%;}
    body.single-tc_events .x-sidebar {display: none;}

    Hope it helps, Cheers!

    #1189111
    simonkneafsey
    Participant

    That was it! Thank you so much. You guys offer amazing support. I will keep buying X Theme licences for all my sites 🙂

    #1189138
    Thai
    Moderator

    You’re most welcome 🙂

    If you need anything else please let us know.

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