Support » Plugin: Simple Custom Post Order » Not sorting Custom Post Categories

  • I am using a custom post “news-events” and the category view “events” does not order the posts, while the main post view does. My manual fix for this was:

    add_action('pre_get_posts','alter_query');
    function alter_query($query) {
    	global $wp_query;
    	if (
    		isset($wp_query->query['news-events-category'])
    		&& in_array($wp_query->query['news-events-category'], array('news','events'))
    		&& !is_admin()
    	):
    		$query->set('orderby' ,'menu_order');
    		$query->set('order' ,'ASC');
    	endif;
    }

    I was wondering if an official fix could be implemented into the plugin though?

  • The topic ‘Not sorting Custom Post Categories’ is closed to new replies.