Created
March 29, 2021 09:32
-
-
Save alamgircsebd/93cf78b50623c4f9f52b3dfd1b2d696c to your computer and use it in GitHub Desktop.
Default filter option open on dokan store listing page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Default filter option open on dokan store listing page | |
* | |
* Use this code on main/child theme functions.php file | |
* or use custom plugin for add scripts on footer area | |
*/ | |
function add_custom_scripts_for_store_listing_page_on_footer() { | |
if ( function_exists( 'dokan_is_store_listing' ) && dokan_is_store_listing() ) { | |
?> | |
<script> | |
(function($) { | |
var Dokan_Store_Listing_Customized = { | |
init: function() { | |
$( '#dokan-store-listing-filter-form-wrap' ).show(); | |
}, | |
}; | |
$(function() { | |
Dokan_Store_Listing_Customized.init(); | |
}); | |
})(jQuery); | |
</script> | |
<?php | |
} | |
} | |
add_action( 'wp_footer', 'add_custom_scripts_for_store_listing_page_on_footer' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment