开发者 |
fahadmahmood
kiranzehra invoicepress |
---|---|
更新时间 | 2024年10月30日 07:11 |
PHP版本: | 7.0 及以上 |
WordPress版本: | 6.6 |
版权: | GPL2 |
版权网址: | 版权信息 |
/wp-content/plugins/
directory.On settings page you can select posts/pages and taxonomies to enable sorting.
Yes, you can sort. And there is a shortcode to list users under taxonomy, terms and children. [WPSO_USERS slug="taxonomy or term slug" id="taxonomy or term id"]. This shortcode will list users on front-end with your sorted order. No need to write another query for it.
Sub query By using the 'WP_Query', you can re-override the parameters.
function my_filter( $query ) { if ( is_admin() || !$query->is_main_query() ) return; if ( is_home() ) { $query->set( 'orderby', 'date' ); $query->set( 'order', 'DESC' ); return; } } add_action( 'pre_get_posts', 'my_filter' );