Tagged: x
-
AuthorPosts
-
July 27, 2016 at 3:07 pm #1105818
intelektualParticipantHello, 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,
TomJuly 27, 2016 at 5:44 pm #1106028
NicoModeratorHi 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.
July 27, 2016 at 6:13 pm #1106051
intelektualParticipantThis reply has been marked as private.July 27, 2016 at 11:24 pm #1106493
LelyModeratorHi 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.
July 28, 2016 at 12:23 am #1106554
intelektualParticipantahaaaaaaaaaaaaa π π 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!
TomJuly 28, 2016 at 1:32 am #1106633
FriechModeratorWe’re delighted to assist you with this.
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1105818 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
