• Resolved scamartist26

    (@scamartist26)


    I am attempting to use this plugin to sort attachments. I think I have done everything needed and it is not working. To “open” attachments to the sort plugin I used the following code, and it is not working. Am I doing it wrong or will this not work with attachments?

    function lcs_attachment_args( $args, $post_type ) {
    	if ( 'attachment' != $post_type ) {
    		return $args;
    	}
    
    	return array_merge( $args, array( 'hierarchical' => 1, ) );
    }
    
    add_filter( 'register_post_type_args', 'lcs_attachment_args', 1, 2 );
    
    add_post_type_support( 'attachment', 'page-attributes' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @scamartist26, Simple Page Ordering doesn’t support attachment because attachment works differently. Page and hierarchical post types are supported by default, post and custom post type can be supported by either one of two methods you mentioned above (we don’t need both).

    Hope that helps!

    Thread Starter scamartist26

    (@scamartist26)

    Ok, thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sort Media not working’ is closed to new replies.