Created
August 3, 2023 06:31
-
-
Save mdibrahimk48/75578510b2f10d2c3196d3127ee8953b to your computer and use it in GitHub Desktop.
This jQuery code will help you to sorting the category column (On Load) on Woo Product Table by CodeAstrology Team.
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
<?php | |
/** | |
* Author: Ibrahim Khalil | |
* Desc: Category Columnwise Sorting (On Load) on woo product table. | |
* Date: 03.08.2023 | |
*/ | |
add_action('wp_footer','wpt_custom_category_colwise_sorting_on_load'); | |
function wpt_custom_category_colwise_sorting_on_load(){ | |
?> | |
<script> | |
jQuery(function($) { | |
'use strict'; | |
$(document).ready(function() { | |
setTimeout(function(){ | |
$('th.wpt_category').trigger('click'); | |
},500); | |
}); | |
}); | |
</script> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment