Viewing 3 replies - 1 through 3 (of 3 total)
  • the plugin don’t support order people

    @mbostic
    The display of the people on the People page is ordered by ‘title’ of the post which is usually the name of the person and if you want to order by something else, here is a trick you can use to set the order of the people displayed on the page:
    1. Set the publication dates (or just the time) of the People post in the sequence for the display order you want.
    2. Go to the theme editor in the WP dashboard and select ‘People Profile Template Page Template (people-profile-template.php)’
    3. In the DIV ID=’main’ you will see:

    $args = array(
    ‘orderby’ => ‘title’,
    ‘order’ => ‘ASC’,
    ‘post_type’ => ‘people’,
    ‘people_category’ => ”,
    ‘paged’ => $paged
    );
    $people_query = new WP_Query($args);

    4. Change ‘orderby’ =>’title’ to ‘orderby =>’date’
    5. Set ‘order’ => to ‘ASC’ or ‘DESC’ depending on how you set the publication dates (ascending or descending).
    Your photos and descriptions will now appear in the desired order.
    Here is the WP reference you can use for the available parameters for ordering $args:
    https://codex.www.ads-software.com/Class_Reference/WP_Query#Category_Parameters

    Better yet:

    1. Modify the orderby argument to menu_order,
    2. Install the Simple Page Ordering plugin,
    3. Add the following snippet to your functions.php file:
    function my_page_supports() {
    	add_post_type_support( 'people', 'page-attributes' );
    }
    add_action( 'after_setup_theme', 'trec_page_supports' );
    function my_order_people( $sortable, $post_type ) {
    	if ( $post_type = 'people' ) {
    		$sortable = true;
    	}
    	return $sortable;
    }
    add_filter( 'simple_page_ordering_is_sortable', 'trec_order_people', 100, 2 );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘changing the order of people on people page’ is closed to new replies.