Support » Plugin: Simple Page Ordering » How to disable sorting on certain custom post types?

Viewing 2 replies - 1 through 2 (of 2 total)
  • For the custom post type, find $post_type_args = array and
    try changing 'hierarchical' => true to false?

    John Brand

    (@brandbrilliance)

    Use the filter in your functions.php

    add_filter( 'simple_page_ordering_is_sortable', 'custom_turn_off_simple_page_ordering_for_pages', 10, 2 );
    
    function custom_turn_off_simple_page_ordering_for_pages( $sortable, $post_type ) {
    
    	// Turn on ONLY for portfolio custom post type
    	if ( $post_type == 'portfolio')
    		$sortable = true;
    	else
    		$sortable = false;
    
    	return $sortable;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to disable sorting on certain custom post types?’ is closed to new replies.