Support » Plugin: Simple Page Ordering » Can't make it work with custom post type

  • Hello,
    I have a non-hierarchical CPT with following settings:

    ‘supports’ => array( ‘title’, ‘editor’, ‘thumbnail’, ‘author’, ‘page-attributes’, ‘post-formats’ ),
    hierarchical’ => false,

    I just add page-attributes to the list of supported post type features.
    But the Drag and Drop does not work.

    Anu help would be really appreciated.

    https://wordpress.org/plugins/simple-page-ordering/

Viewing 3 replies - 1 through 3 (of 3 total)
  • hierarchical needs to be true

    Actually, if you have ‘page-attributes’ supported, it should work whether it’s hierarchical or not.

    Could be a template thing, if the ‘orderby’ property is set for the query elsewhere.

    John Brand

    (@brandbrilliance)

    Actually you can use the filter to override it.

    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 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can't make it work with custom post type’ is closed to new replies.