Tagged: x
-
AuthorPosts
-
June 29, 2016 at 1:49 pm #1065328
HoustonParticipantIn the customizer I have set the site to FULLWIDTH. Is there no way to put a sidebar now in the blog page? If so, please enlighten me.
June 29, 2016 at 2:05 pm #1065343
HoustonParticipantAfter perusing through the forum, I have concluded that I need to change the layout to “Content left, Sidebar right” and then go and change all the pages to “Fullwidth”. So I tried that but the BLOG page still does not show a sidebar. The BLOG PAGE also has no way of changing the template at all. Am I missing something or is there a better way?
Many thanks,
HoustonJune 29, 2016 at 2:27 pm #1065385
HoustonParticipantLayout and Design is set to Content left, Sidebar right
Blog is set to use global content layout
I cant get these uploads to load the correct image. Arghhhhhhhhhh
So here.
June 29, 2016 at 2:47 pm #1065426
Nabeel AModeratorHi there,
If you’re using “Content left, Sidebar right” then there should be sidebar on your blog page. Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / passwordDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
June 29, 2016 at 3:18 pm #1065460
HoustonParticipantThis reply has been marked as private.June 29, 2016 at 8:58 pm #1066018
FriechModeratorJune 30, 2016 at 9:33 am #1066744
HoustonParticipantThis reply has been marked as private.June 30, 2016 at 1:54 pm #1067134
DarshanaModeratorHi there,
Please try switching to the parent theme and see if that renders your sidebar. If so, you will need to check your child theme templates and customizations added which causes this issue.
Thanks!
June 30, 2016 at 6:17 pm #1067459
HoustonParticipantYes, that made it appear. So I started investigating and found that I used this code in the functions.php file to create a sidebar on the Products page of woocommerce. I need that. So would you happen to know how I can make this work?
http://grab.by/Rc1KHere is the code that is in the functions.php in the child-theme.
//customsidebar for the products page if ( ! function_exists( 'x_get_content_layout' ) ) : function x_get_content_layout() { $stack = x_get_stack(); $content_layout = x_get_option( 'x_' . $stack . '_layout_content', 'sidebar-content' ); // if ( $content_layout != 'full-width' ) { if ( is_home() ) { $opt = x_get_option( 'x_blog_layout', 'sidebar' ); $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_archive() ) { if ( x_is_shop() || x_is_product_category() || x_is_product_tag() || x_is_product() ) { $layout = 'sidebar-content'; } else { $opt = x_get_option( 'x_archive_layout', 'sidebar' ); $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', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( x_is_buddypress() ) { $opt = x_get_option( 'x_buddypress_layout_content', 'sidebar' ); $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'; } return $layout; } endif; add_filter( 'ups_sidebar', function ( $default_sidebar ) { $sidebars = get_option( 'ups_sidebars' ); foreach ( $sidebars as $id => $sidebar ) { if ( x_is_shop() || x_is_product_category() || x_is_product_tag() || x_is_product() ) { if ( array_key_exists( 'index-shop', $sidebar ) && $sidebar['index-shop'] == 'on' ) { return $id; } } } return $default_sidebar; }, 9999 );Many thanks,
HoustonJune 30, 2016 at 11:36 pm #1067933
Rue NelModeratorHello Houston,
Please have your code updated and use this instead to have a sidebar in your blog index and on single post;
//customsidebar for the products page if ( ! function_exists( 'x_get_content_layout' ) ) : function x_get_content_layout() { $stack = x_get_stack(); $content_layout = x_get_option( 'x_' . $stack . '_layout_content', 'sidebar-content' ); // if ( $content_layout != 'full-width' ) { if ( is_home() ) { $opt = x_get_option( 'x_blog_layout', 'sidebar' ); //$layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; $layout = $content_layout; } elseif ( is_singular( 'post' ) ) { $meta = get_post_meta( get_the_ID(), '_x_post_layout', true ); //$layout = ( $meta == 'on' ) ? 'full-width' : $content_layout; $layout = $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_archive() ) { if ( x_is_shop() || x_is_product_category() || x_is_product_tag() || x_is_product() ) { $layout = 'sidebar-content'; } else { $opt = x_get_option( 'x_archive_layout', 'sidebar' ); $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', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( x_is_buddypress() ) { $opt = x_get_option( 'x_buddypress_layout_content', 'sidebar' ); $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'; } return $layout; } endif;Please let us know if this works out for you.
July 1, 2016 at 10:12 am #1068483
HoustonParticipantThank you very much for this.
But, I put this code in replacing what was there and still no sidebar.
http://splitlightdesigns.com/askari-stage/blog/
Many thanks,
HoustonJuly 1, 2016 at 2:07 pm #1068731
HoustonParticipantThis reply has been marked as private.July 1, 2016 at 6:54 pm #1068972
RadModeratorHi there,
Please change it into this,
function x_get_content_layout() { $stack = x_get_stack(); $content_layout = x_get_option( 'x_' . $stack . '_layout_content', 'sidebar-content' ); // if ( $content_layout != 'full-width' ) { if ( is_home() ) { $opt = x_get_option( 'x_blog_layout', 'sidebar' ); //$layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; $layout = 'sidebar-content'; } elseif ( is_singular( 'post' ) ) { $meta = get_post_meta( get_the_ID(), '_x_post_layout', true ); //$layout = ( $meta == 'on' ) ? 'full-width' : $content_layout; $layout = $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_archive() ) { if ( x_is_shop() || x_is_product_category() || x_is_product_tag() || x_is_product() ) { $layout = 'sidebar-content'; } else { $opt = x_get_option( 'x_archive_layout', 'sidebar' ); $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', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( x_is_buddypress() ) { $opt = x_get_option( 'x_buddypress_layout_content', 'sidebar' ); $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'; } return $layout; }Thanks!
July 1, 2016 at 7:03 pm #1068980
HoustonParticipantExcellent, that works. One last item, it still does not show on the POST page, just the index page. 🙁
Also, this code prevents the sidebar that shows up in the STORE to revert to the blog sidebar when viewing products.
July 1, 2016 at 10:48 pm #1069251
Rue NelModeratorHello There,
Sorry if it didn’t quite resolve the issue. There is a missing piece of code. Please update it and use this instead:
function x_get_content_layout() { $stack = x_get_stack(); $content_layout = x_get_option( 'x_' . $stack . '_layout_content', 'sidebar-content' ); // if ( $content_layout != 'full-width' ) { if ( is_home() ) { $opt = x_get_option( 'x_blog_layout', 'sidebar' ); //$layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; $layout = 'sidebar-content'; } elseif ( is_singular( 'post' ) ) { $meta = get_post_meta( get_the_ID(), '_x_post_layout', true ); //$layout = ( $meta == 'on' ) ? 'full-width' : $content_layout; $layout = 'sidebar-content'; } 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_archive() ) { if ( x_is_shop() || x_is_product_category() || x_is_product_tag() || x_is_product() ) { $layout = 'sidebar-content'; } else { $opt = x_get_option( 'x_archive_layout', 'sidebar' ); $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', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( x_is_buddypress() ) { $opt = x_get_option( 'x_buddypress_layout_content', 'sidebar' ); $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'; } return $layout; }Please let us know if this works out for you.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1065328 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>

