Filtered dropdown for author?

I don’t know if this counts as an answer, but I wanted to share in case it is helpful. It looks like you can, although there’s an important caveat in that this method needs some fixing to make work. Here’s a blog post that describes how to set up the Select2 JavaScript library to make … Read more

Woocommerce Force the category choice before creating new product? [duplicate]

You can resolve this issue by simply specifying the taxonomy you want to display. $dropdown = wp_dropdown_categories( array( ‘name’ => ‘category_id[]’, ‘hide_empty’ => false, ‘echo’ => false, // Set taxonomy for product categories. ‘taxonomy’ => ‘product_cat’, ) ); Before posting here, you should at least do some research on how this code snippet worked for … Read more

How to change the default orderby from “Date” to e.g. “Title” or my custom column in content type records list in admin?

pre_get_posts the right hook you need to use. function CPT_set_default_orderby($q){ global $pagenow, $typenow; if( is_admin() && ‘edit.php’ == $pagenow && ‘post’ == $typenow && !isset($_GET[‘orderby’]) ){ // to order by title $q->set(‘orderby’, ‘title’); // to orderby with meta key $q->set(‘orderby’, ‘meta_key’); $q->set(‘meta_key’, ‘expiration’); } } add_action(‘pre_get_posts’, ‘CPT_set_default_orderby’);