Support » Plugin: CMS Page Order » [Plugin: CMS Page Order] Feature suggestion

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author bergius


    Hi Ricardo,

    I’m not sure I follow on what you mean. By default, pages doesn’t have categories, but custom post types can have categories of course. Are you requesting the ability to also reorder custom post types (with a filter hook to filter by category etc.)? Cause that’s something I’ve been thinking of and may add in the future (don’t know exactly when though). Just want to make sure I understand you.

    I think Ricardo means, for each custom post type, to be shown in the page tree.

    For example

    Page 1
    – Page 2
    – Page 3
    Page 4
    – Page 5
    – Page 6
    Custom type type
    – Custom post type, post 1
    – Custom post type, post 2
    – Custom post type, post 3

    This way, you can see every content (pages, posts, custom post types) in single WP admin page (ie : CMS page order).

    And you could order custom post types, if they actually are “hierarchical”. “Non hierarchical” custom post types couldn’t be reorder, instead be sorted by date for example.

    Sorry for the delay, had a very busy week.

    @bergius: that’s exactly what I meant. If you add CPT support to this plugin, it would be really nice to allow users to filter the results by custom taxonomies before they start ordering.

    In example, let’s suppose that:
    – we have a CPT called “Shows”
    – we have a custom taxonomy which splits them in “Current” and “Archive”
    – we want the shows in the Archive page to be ordered alphabetically
    – we want the shows in the Current page to be ordered manually

    It would be much easier to order current shows if I apply first a filter by taxonomy in order to hide all shows which aren’t current.

    @nicomollet: actually, I don’t think mixing all content types in a single page would be a good idea, it seems to me that it would be more confusing. Every CPT should have its own “Ordering” link in its own menu.

    Plugin Author bergius


    Yes, the order page should be a subpage to each CPT. I believe that’s the most straightforward way, as well. I’ll put this on my todo, Ricardo. Thanks for the suggestion.

    No problem. Let me know if you want me to translate it to Spanish when you’re done.

    Plugin Author Bill Erickson


    bergius, I love the plugin but need custom post type support. Here’s a patch that adds it:

    Changes are very simple. At the top where you add the subpage, I created a filterable array with all post types to order (default is just page). It then loops through these, creating a subpage for each.

    Then everywhere else you had hardcoded ?post_type=page, I used an escaped $_GET[‘post_type’].

    This seems to be working for me but I haven’t done extensive testing. Some things to explore before committing:
    – Is the GET variable the best way to get the current admin page’s post type? I havent built any plugins that deal with the admin side so I don’t know best practices. I just saw the post type in the URL string so went for it.
    – I don’t know what the WPML language switcher is so haven’t tested how this affects it. I’m assuming the GET variable is available when this is used because it looks like this function is called on the order admin page

    Let me know if there’s anything else I can do to help. I’m looking forward to using this plugin often in client projects.

    Plugin Author Bill Erickson


    Oh and here’s how to modify the array from a theme or plugin:

    add_filter( 'cmspo_post_types', 'be_order_post_types' );
    function be_order_post_types( $post_types ) {
    	$post_types = array( 'page', 'rotator' );
    	return $post_types;
    Plugin Author Bill Erickson


    In case anyone is curious, these changes have been added to the plugin.

    Here’s how to modify the post types it applies to (by default it only shows up on Pages):

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: CMS Page Order] Feature suggestion’ is closed to new replies.