How to add tab which is visible only in admin side of product in woocommerce? [closed]

I have worked on your issue and found a solution after some Google. Note: Add the below mentioned code to theme’s functions.php or any plugin’s file. Code: This filter function will add a custom tab to the Products Data metabox <?php add_filter( ‘woocommerce_product_data_tabs’, ‘add_my_custom_product_data_tab’ , 99 , 1 ); function add_my_custom_product_data_tab( $product_data_tabs ) { $product_data_tabs[‘my-custom-tab’] … Read more

ORDER BY custom field value

You can create groups of meta_queries using specific compare operation on them, and since you want to order based in a single custom field, you can keep the order declaration dedicated to the single meta field. So: $q = new WP_Query( array( ‘meta_key’ => ‘population’, //setting the meta_key which will be used to order ‘orderby’ … Read more

Sortable Custom Columns in User Panel (users.php)?

My first answer was completely off-mark and I’m completely rewriting it… But thanks to Milo’s hint, I found the solution here: http://wordpress.mcdspot.com/2011/05/24/search-admin-user-list-on-first-and-last-names/ After adapting it, this works for me with ‘facebook’ and ‘twitter’ author_meta. add_action(‘pre_user_query’,’wpse_27518_pre_user_query’); function wpse_27518_pre_user_query($user_search) { global $wpdb,$current_screen; if ( ‘users’ != $current_screen->id ) return; $vars = $user_search->query_vars; if(‘facebook’ == $vars[‘orderby’]) { $user_search->query_from … Read more