Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alamgircsebd/93cf78b50623c4f9f52b3dfd1b2d696c to your computer and use it in GitHub Desktop.
Save alamgircsebd/93cf78b50623c4f9f52b3dfd1b2d696c to your computer and use it in GitHub Desktop.
Default filter option open on dokan store listing page
/**
* 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