Tagged: x
-
AuthorPosts
-
January 15, 2017 at 2:39 pm #1331072
RadModeratorHi there,
What error you’re getting? If we made mistake testing through admin, your site will go down until we fix it through FTP. Hence, it’s best to provide it ahead of time to avoid downtime. And we’re not sure what’s the real issue yes and it may take time either.
Thanks!
February 10, 2017 at 2:18 pm #1366272
anzezalaParticipantHi,
hadn’t had time to work on this issue for a while. So to explain my problem again so we can start over. You successfully provided me with the code to have a side menu with product categories. But the categories menu is only visible when i am on my main shop page (index shop page). I would like to have the categories menu visible when i chose one of the categories.
I have provided you pictures of the menu that i would like when i click on a categorie.
Example: i clicked on “Likerji” categorie which you can see in the URL, but the categorie menu isn’t there. That is the problem if you could please help me out.February 10, 2017 at 11:10 pm #1366721
RadModeratorHi there,
Please add this code to your child theme’s functions.php
add_filter('ups_sidebar', 'woocommerce_shop_sidebar', 9999); function woocommerce_shop_sidebar ( $sidebar ) { return x_is_product_category() || x_is_shop() ? 'SIDEBAR_ID' : $sidebar; }Then just replace SIDEBAR_ID with the ID of the sidebar you created at Admin > Appearance > Sidebar.
Then add category widget on that sidebar.
Hope this helps.
February 11, 2017 at 11:49 am #1367110
anzezalaParticipantHi,
it didn’ work. I think a did everything as you said. I have this code already pasted in. That is the code that the original sidebar menu on shop index page works. Maybe the is something that we could change to make it work.Here is the code:
function x_my_custom_widgets_init() {
register_sidebar( array(
‘name’ => __( ‘My Shop Sidebar’, ‘__x__’ ),
‘id’ => ‘sidebar-my-custom-shop’,
‘description’ => __( ‘Appears on the index shop page.’, ‘__x__’ ),
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h4 class=”h-widget”>’,
‘after_title’ => ‘</h4>’,
) );}
add_action( ‘widgets_init’, ‘x_my_custom_widgets_init’ );
February 11, 2017 at 11:09 pm #1367560
RadModeratorHi there,
Have you customized the templates as well? Because you didn’t need that if not. That code is registering a new sidebar through coding but it’s the same as adding sidebar at Admin > Appearance > Sidebars without a code. You’ll only need that code if you will customize your template which needs another dynamic_sidebar() declaration. I need to see your current setup, would you mind providing your FTP credentials as well?
To make it simple, just add sidebar through Admin > Appearance > Sidebars and pick the sidebar ID and add this code to your child theme’s functions.php with the ID.
add_filter('ups_sidebar', 'woocommerce_shop_sidebar', 9999); function woocommerce_shop_sidebar ( $sidebar ) { return x_is_product_category() || x_is_shop() ? 'SIDEBAR_ID' : $sidebar; }No other coding is needed if you haven’t edited the templates yet.
Thanks.
February 12, 2017 at 5:08 am #1367731
anzezalaParticipantThis reply has been marked as private.February 12, 2017 at 3:46 pm #1368121
RadModeratorHi there,
It should be okay now, please check how it’s implemented. I also disabled your custom wp-sidebar by renaming it, it’s not needed 🙂
Cheers!
February 12, 2017 at 4:28 pm #1368138
anzezalaParticipantThank you so much. Really appreciate it.
February 12, 2017 at 6:30 pm #1368193
NicoModeratorYou’re welcome.
Feel free to ask us again.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1321366 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
