Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #991990
    bulli79
    Participant

    hello

    my problem is this i have a spa theme template.

    global setting = full width

    i have installed woocommerce to sell hair products so i only need side bar to show in these pages:

    online shop
    my account
    Cart
    Checkout

    now when i go into the pages from dashborad i set template to sidebar left but doesnt show.

    any help would be fantastic.

    website: haircouturecamberwell.com

    i will post log in details

    #991995
    bulli79
    Participant
    This reply has been marked as private.
    #992021
    Nabeel A
    Moderator

    Hi there,

    Thanks for writing in! Please change the Content Layout from Fullwidth to Content Left, Sidebar Right. To do this, navigate to Appearance > Customize > Layout and Design > Content Layout > Content Left, Sidebar Right.

    Thanks!

    #992291
    bulli79
    Participant

    thank for your reply.
    i can do that but i dont want the sidebar showing on rest of the site i only want it to show on woocommerce pages IE. “Online Shop, My Account, Cart, Check Out”

    i dont want it showing on the rest of the site.

    when i change it from customize menu the sidebar shows on the blogg page.

    the other pages it wont show because i can set tamplate to full width on the individual pages and i havent got that option on the blog page for some reason.

    #992385
    Rupok
    Member

    Hi there,

    If you want to show sidebar for any page then you need to set the layout from Customizer first. You can set layout to fullwidth for the pages you don’t want sidebar. This is default functionality and if you need something different then it would be possible with custom development with Child Theme.

    Thanks

    #992544
    bulli79
    Participant

    I have done this it has worked for all the pages except blog page it doesnt seem to have the settings to adjust template.

    any ideas?

    #992873
    Rue Nel
    Moderator

    Hello There,

    DO you want to have a fullwidth layout in your blog? if that’s the case, please go to your customizer, Appearance > Customize > Blog > Layout and set it to “Fullwidth”. You may also select for the archive pages as well which you can find right next to the blog layout settings.

    Hope this helps.

    #993084
    bulli79
    Participant

    thank you

    that worked for the blog page so we are getting closer. only thing is the sidebar still shows up on the individual posts?

    anything i can do for this?

    #993116
    Rue Nel
    Moderator

    Hello There,

    To resolve this issue where no sidebar should display on single blog post, since you have your child theme active and ready, please follow the following steps below:
    1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
    2] Insert the following code into that new file

    <?php
    
    // =============================================================================
    // VIEWS/ICON/WP-SIDEBAR.PHP
    // -----------------------------------------------------------------------------
    // Sidebar output for Icon.
    // =============================================================================
    
    ?>
    
    <?php if ( x_get_content_layout() != 'full-width' && ! is_single() ) : ?>
    
      <aside class="x-sidebar nano" role="complementary">
        <div class="max width nano-content">
          <?php if ( get_option( 'ups_sidebars' ) != array() ) : ?>
            <?php dynamic_sidebar( apply_filters( 'ups_sidebar', 'sidebar-main' ) ); ?>
          <?php else : ?>
            <?php dynamic_sidebar( 'sidebar-main' ); ?>
          <?php endif; ?>
        </div>
      </aside>
    
    <?php endif; ?>

    3] Save the file named as wp-sidebar.php
    4] Upload this file to your server in the child theme’s folder
    wp-content/themes/x-child/framework/views/icon/

    And you also need to insert this following code in your child theme’s functions.php file.

    // No sidebars on single posts
    // =============================================================================
    function no_sidebars_allowed($contents) {
      if ( is_single() ) {
        $contents = 'fullwidth';
      }
      
      return $contents;
    }
    add_filter('x_option_x_layout_content', 'no_sidebars_allowed');
    // =============================================================================

    Please let us know if this works out for you.

    #993153
    bulli79
    Participant

    thank for help

    actually i found the solution. in the post admin page if you scroll down there is a option for the post “full Width Layout” you tick that and thats it.

    i didnt see this because i was looking on the side where the templates settings usually are.

    #993165
    Christopher
    Moderator

    Glad to see that you were able to fix this.

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