Support » Plugin: Post Types Order » Reorder not reflected in taxonomy

  • Resolved jimmywags


    I’ve used this plugin on several clients’ sites with good results. (We have a developer’s license.) But on a current testing site, there seems to be something wrong in the execution or a bug somewhere.

    We have a custom post type named ‘People’ with a custom taxonomy called ‘Groups’. There are about 20 People posts and 2 Groups. Using the plugin, the People posts are ordered within their Group taxonomy. There is 1 People post that falls within both Groups. All the others are in a single Group.

    On the WP admin pages, the reorder works fine. Changes are saved correctly. On the front-end, one Group is shown in the correct re-order. The other group is not.

    The two groups are displayed by calling the same shortcode (and only via the shortcode), so I do not believe the error is there. But I cannot figure out why the one Group is shown correctly and the other is not.

    The Auto-Sort is set to ON/Custom. The code for the shortcode is below.

    $args = array( 'post_type' => 'people', 'posts_per_page' => -1, 'order' => 'ASC' );
    if( $group )
    	$args['tax_query'] = array( array( 'taxonomy' => 'group',
    							 'field' => 'slug',
    							'terms' => $group ) );
    $people = get_posts( $args );
    $ul = '';
    $ul .= '<ul class="people-list">';
    $ul .= "\n";
    foreach( $people as $this_person )
    	$ul .= '<li id="'. $this_person->post_name /* slug */ .'">';
    	$ul .= '<h2>'. get_the_title( $this_person->ID ) .'</h2>';
    	if( get_field( 'title', $this_person->ID ) != '' )
    		$ul .= '<p class="title">'. get_field( 'title', $this_person->ID ) .'</p>';
    	$ul .= '<div class="bio-wrap">'. str_replace( ']]>', ']]>', apply_filters( 'the_content', $this_person->post_content ) ) .'</div>';
    	$ul .= '</li>';
    	$ul .= "\n";
    $ul .= '</ul>';
    $ul .= "\n";
    return $ul;

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Reorder not reflected in taxonomy’ is closed to new replies.