This topic has 5 replies, 3 voices, and was last updated 8 months ago ago by Andrew Mitchell
Hello,
I’m trying to add code that will allow the filters that are on the left side in the image (left center, in green) to slide out, so that when they slide out they also click on the “Filters” button (on top) that I added as a widget shop filters.
I would like the filters in shop filters to work like this button that ejects the filters (on mobile devices)
Dear @Kombajn88,
We trust this message finds you well.
We would like to kindly suggest that you insert the following snippet of code into the functions.php file located within your child theme directory:
add_action('wp_footer', 'n2t_wp_footer', 999);
function n2t_wp_footer(){
?>
<script>
jQuery(document).ready(function($) {
$('.open-filters-btn a').on('click touchend', function (event){
event.preventDefault();
$('.et-toggle-mob-sidebars-inner .et-toggle').trigger('click');
});
});
</script>
<?php
}
This code is intended to enhance the functionality of your website. Should you require any further assistance or have any questions regarding this process, please do not hesitate to reach out.
Warm regards,
The 8Theme Team
The code works, thank you very much for it, I added it to the child theme but…
I have a small problem, I used the parent theme all the time, only now I realized what the child theme is really for (after the xstore update, this code will stop working in the parent theme).
I exported (photo) custom settings, but unfortunately not all the changes I made transferred to the child theme, for example, in the child theme I have a double header or untranslated things.
Hence my question, what should I do? Is it possible somehow to transfer all settings to the child theme? Or am I left with adding codes anew every time after updating xstore?
Or maybe an option is to restore from backup (after enabling the child theme temporarily?).
Thank you in advance for your help
Dear @Kombajn88,
We would like to suggest that you consider utilizing the following plugin to incorporate your custom codes:
https://wordpress.org/plugins/code-snippets/
Should you require any further assistance, please do not hesitate to reach out.
Warm regards,
The 8Theme Team
Dear Kombajn88,
We trust our theme is enhancing your experience. Taking a brief moment to rate it with a glowing 5 stars on ThemeForest would be immensely appreciated. Your feedback holds significant value for us.
Click here to rate now: https://themeforest.net/downloads
Thank you sincerely for your ongoing support!
Best Regards,
The 8Theme Team
The issue related to '‘Displaying filters after clicking on the top filters’' has been successfully resolved, and the topic is now closed for further responses