Home / Forums / WoodMart support forum / Categories dosent showup
Home › Forums › WoodMart support forum › Categories dosent showup
Categories dosent showup
- This topic has 5 replies, 2 voices, and was last updated 6 years, 2 months ago by
Eric Watson.
-
AuthorPosts
-
August 29, 2019 at 2:04 pm #141138
kimitshahParticipanti have add new categories in products > categories. that dosent show-up on category list (Right side of searchbar) and also in category menu. can you please guide how to get rid of this problem
August 29, 2019 at 2:20 pm #141142
Eric WatsonParticipantHello,
Categories do not automatically appear in the menu, you need to go in Appearance -> Menu and add them yourself.
Kind Regards
XTemos StudioAugust 29, 2019 at 2:31 pm #141144
kimitshahParticipanti have added all the categories. but that dosent show up in category list to the search in header
How do i solve this problemAttachments:
You must be logged in to view attached files.August 29, 2019 at 2:39 pm #141151
Eric WatsonParticipantBy default, categories are shown in which there are products and empty ones are hidden, we can give you a custom code to show all categories.
Kind Regards
XTemos StudioAugust 29, 2019 at 2:42 pm #141152
kimitshahParticipantyes please if you can help me to get rid of it
August 29, 2019 at 2:57 pm #141156
Eric WatsonParticipantTry to add the following PHP code snippet to the child theme functions.php file to do this
function woodmart_show_categories_dropdown() { $args = array( 'hide_empty' => 0, 'parent' => 0 ); $terms = get_terms('product_cat', $args); if( ! empty( $terms ) && ! is_wp_error( $terms ) ) { ?> <div class="search-by-category input-dropdown"> <div class="input-dropdown-inner woodmart-scroll-content"> <input type="hidden" name="product_cat" value="0"> <a href="#" data-val="0"><?php esc_html_e('Select category', 'woodmart'); ?></a> <div class="list-wrapper woodmart-scroll"> <ul class="woodmart-scroll-content"> <li style="display:none;"><a href="#" data-val="0"><?php esc_html_e('Select category', 'woodmart'); ?></a></li> <?php if( ! apply_filters( 'woodmart_show_only_parent_categories_dropdown', false ) ) { $args = array( 'title_li' => false, 'taxonomy' => 'product_cat', 'use_desc_for_title' => false, 'walker' => new WOODMART_Custom_Walker_Category(), ); wp_list_categories($args); } else { foreach ( $terms as $term ) { ?> <li><a href="#" data-val="<?php echo esc_attr( $term->slug ); ?>"><?php echo esc_attr( $term->name ); ?></a></li> <?php } } ?> </ul> </div> </div> </div> <?php } }Kind Regards
XTemos Studio -
AuthorPosts
Tagged: category listing
- You must be logged in to create new topics. Login / Register