Home Forums WoodMart support forum Filters NOt working properly after Theme Update

Filters NOt working properly after Theme Update

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #45286

    innovative6
    Participant

    After 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=product

    #45313

    Artem Temos
    Keymaster

    Hello,

    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

    #45322

    innovative6
    Participant

    i have already done that

    #45323

    innovative6
    Participant

    plz check private msg

    #45324

    Artem Temos
    Keymaster
    #45334

    innovative6
    Participant

    ok what about clear filter going back to home page

    #45336

    Artem Temos
    Keymaster

    As 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' );
    #45380

    innovative6
    Participant

    Dear 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

    #45395

    Artem Temos
    Keymaster

    In this case, you can just find this function in the file inc/woocommerce.php and replace with the code we sent you.

    #45465

    innovative6
    Participant

    Thanks soo much

    #45466

    Artem Temos
    Keymaster

    Great, 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.

    #45472

    innovative6
    Participant

    /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

    #45478

    innovative6
    Participant

    Ooo sorry for the feedback i will change that back to 5 stars

    #45481

    innovative6
    Participant

    Superb its working after appending the code with them function.php Thanks Dear

    #45482

    Artem Temos
    Keymaster

    Great, thank you very much for the review 🙂 Feel free to contact us if you will have any extra questions.

Viewing 15 posts - 1 through 15 (of 15 total)