Home › Forums › WoodMart support forum › Filters NOt working properly after Theme Update
Filters NOt working properly after Theme Update
- This topic has 14 replies, 2 voices, and was last updated 6 years, 8 months ago by Artem Temos.
-
AuthorPosts
-
March 12, 2018 at 6:23 am #45286
innovative6ParticipantAfter updating the theme many things went wrong now i observed
[1.] clearing filter takes back to home page https://kadali.store/?post_type=product
[2.] i made under $5 before is used to work but nw its not working https://kadali.store/?post_type=product&min_price=0&max_price=5&post_type=productMarch 12, 2018 at 8:20 am #45313
Artem TemosKeymasterHello,
Could you please disable all plugins that are not related to our theme and provide us your admin access so we can check it?
Thank you in advance
March 12, 2018 at 8:32 am #45322
innovative6Participanti have already done that
March 12, 2018 at 8:38 am #45323
innovative6Participantplz check private msg
March 12, 2018 at 8:47 am #45324
Artem TemosKeymasterTry to use this link instead https://kadali.store/?post_type=product&min_price=0.1&max_price=5
March 12, 2018 at 9:51 am #45334
innovative6Participantok what about clear filter going back to home page
March 12, 2018 at 10:06 am #45336
Artem TemosKeymasterAs we mentioned, we will fix this in our next theme update. For now, you can add the following code snippet to the functions.php file in the child theme to fix this
function woodmart_clear_filters_btn() { $url = $_SERVER['REQUEST_URI']; $filters = array( 'filter_', 'min_price', 'max_price', 'product_visibility', 'stock', 'onsales' ); $need_clear = false; foreach ( $filters as $filter ) if ( strpos( $url, $filter ) ) $need_clear = true; if ( $need_clear ) { $reset_url = strtok( $url, '?' ); if ( isset( $_GET['post_type'] ) ) $reset_url = add_query_arg( 'post_type', wc_clean( wp_unslash( $_GET['post_type'] ) ), $reset_url ); ?> <div class="woodmart-clear-filters-wrapp"> <a class="woodmart-clear-filters" href="<?php echo esc_url( $reset_url ); ?>"><?php echo esc_html__( 'Clear filters', 'woodmart' ); ?></a> </div> <?php } } add_action( 'woodmart_before_active_filters_widgets', 'woodmart_clear_filters_btn' );
March 12, 2018 at 11:09 am #45380
innovative6ParticipantDear i dint installed child theme, can i add code to main active theme function.php OR its a must to install child theme, if so can u please guide me how to install n where to find child theme function. Please guide me
March 12, 2018 at 12:37 pm #45395
Artem TemosKeymasterIn this case, you can just find this function in the file
inc/woocommerce.php
and replace with the code we sent you.March 12, 2018 at 3:21 pm #45465
innovative6ParticipantThanks soo much
March 12, 2018 at 3:24 pm #45466
Artem TemosKeymasterGreat, we are glad that you solved. Could you be so kind and remove your negative review on themeforest? ๐ Don’t worry about the support. We are always here and will always help you with any questions regarding our theme.
March 12, 2018 at 3:39 pm #45472
innovative6Participant/wp-content/themes/woodmart/inc —> i dint find any woocommerce.php but there is functions.php NOW do u want me to add/append the code u given to function.php OR u want me to creat a new woocommerce.php with the code u given
March 12, 2018 at 3:42 pm #45478
innovative6ParticipantOoo sorry for the feedback i will change that back to 5 stars
March 12, 2018 at 3:50 pm #45481
innovative6ParticipantSuperb its working after appending the code with them function.php Thanks Dear
March 12, 2018 at 3:51 pm #45482
Artem TemosKeymasterGreat, thank you very much for the review ๐ Feel free to contact us if you will have any extra questions.
-
AuthorPosts
Tagged: filters, theme update
- You must be logged in to create new topics. Login / Register