Tagged: x
-
AuthorPosts
-
August 16, 2016 at 12:00 pm #1133842
hbeditParticipantHello,
1) I know that it is not possible to show sub-categories in Woocommerce breadcrumb.
But i would like to show at least the category, like that :
Home > Shop > Category > product
What is the right code to insert on my Icon theme, and where to insert it ? Is it in functions.php of my child theme ?
2) I would like that the product page looks the same than the other pages (categories page, article page, etc.) whith the widget bar on the right.
Actually the page is fullwidth.
How can i do it ?
Many thanks !
August 16, 2016 at 12:01 pm #1133847
hbeditParticipantThis reply has been marked as private.August 16, 2016 at 8:28 pm #1134484
FriechModeratorHi There,
Thanks for writing in! Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.
Thanks for understanding.
August 17, 2016 at 3:49 am #1134894
hbeditParticipantHello Friech,
Thanks for your answer.
I have tried different codes and i have found the right one on your support, witch allow to show also sub-categories on breadcrumb !!!
For those who need that, here is the code to add to the functions.php file in the child theme. You need to use SEO Yoast plugin.
if ( ! function_exists( 'x_breadcrumbs' ) ) : function x_breadcrumbs() { if ( x_get_option( 'x_breadcrumb_display', 1 ) && function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } } endif;It works perfectly for me !
Best regards.
August 17, 2016 at 6:35 am #1135056
DarshanaModeratorGlad you were able to find the right solution and thanks for sharing it with other members.
Cheers!
August 17, 2016 at 12:46 pm #1135489
hbeditParticipantHello Darshana, you are welcome, we all need to help each other.
Anyway i realize that nobody has answered to my second question, could you take a look ?
I paste it here :
2) I would like that the Woocommerce product page looks the same than the other pages (categories page, article page, etc.) whith the widgets bar on the right.
Actually the product pages are fullwidth.
How can i do it ?
Thanks !
August 17, 2016 at 1:58 pm #1135579
RupokMemberHi there,
Thanks for updating and sorry somehow that was overlooked. So you are trying to show sidebar on your single product page, right? It’s possible with some custom code as you can see on this thread – https://community.theme.co/forums/topic/icon-shop-help-show-sidebar-on-product-page/#post-267925
Cheers!
August 17, 2016 at 3:45 pm #1135751
hbeditParticipantHello Rupok, it works perfectly, thank you !!
I paste here the code to insert on the functions.php (child theme) file if somebody needs the same thing and read this thread :
function x_get_content_layout() { $content_layout = x_get_option( 'x_layout_content', 'content-sidebar' ); 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_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', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } else { $opt = x_get_option( 'x_archive_layout', 'sidebar' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } } elseif ( x_is_product() ) { $layout = 'content-sidebar'; } 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; } return $layout; }Best regards !
August 17, 2016 at 4:01 pm #1135774
NicoModeratorHi There,
Thank you so much for sharing the solution and we are very happy to hear that it is working great.
Feel free to ask us again.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1133842 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
