WordPress.org

Ready to get started?Download WordPress

Forums

Admin Collapse Subpages
[resolved] use for custom post types (7 posts)

  1. mores
    Member
    Posted 1 year ago #

    This plugin is exactly what we need.
    But we're not using Pages but a number of custom post types. Would it be possible to adapt this?

    Next question: Does this integrate with ALL Page lists? Like when you're using the editor to add a link and browse the available Pages?

    http://wordpress.org/extend/plugins/admin-collapse-subpages/

  2. JRobson153
    Member
    Posted 7 months ago #

    To anyone still interested in this question, this plugin does work great for custom post types right out of the box!

    Of course by nature it's only meant for page-like post types so make sure you've set
    'hierarchical' => true,

  3. Gravitate
    Member
    Posted 4 months ago #

    This doesn't seem to work with custom post types.
    I can get it to work if I modify the code.

    admin_collapse_subpages.php
    Changed
    if ( is_admin() && isset($_GET['post_type']) && $_GET['post_type'] == 'page' && $pagenow =='edit.php' ) {
    TO
    if ( is_admin() && isset($_GET['post_type']) && $_GET['post_type'] == 'show' && $pagenow =='edit.php' ) {

    admin_collapse_subpages.js
    Changed
    jQuery('.post-type-page .subsubsub').append(links);
    To
    jQuery('.post-type-show .subsubsub').append(links);

    The issue is if the Plugin is updated that it would get overwritten.
    You mentioned that it should work out of the box. How is that possible.

    Is it possible for an update to allow me to specify which post types that I would want this for with checkboxes.
    Thanks

  4. benrich
    Member
    Posted 4 months ago #

    I'll ditto what Gravitate has said. If an update can include all post types (with a hierarchical) that would be awesome.

  5. bravokeyl
    Member
    Plugin Author

    Posted 4 months ago #

    New version will include this ..

  6. bravokeyl
    Member
    Plugin Author

    Posted 4 months ago #

    @Gravitate ,i think it works for custom post type named show if you changed the code as above..

  7. bravokeyl
    Member
    Plugin Author

    Posted 4 months ago #

    Version 2.2 released which supports custom post types which are hierarchical..

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.