• Resolved shagdirty

    (@shagdirty)


    Wondering if there’s a way to only show top level pages (custom posts actually) in the Attributes > Parent drop down. Long story short, there will be a ton of child posts but a limited number of top level parent posts. Rather than having the Parent drop down display thousands of potential parents if all of the child posts are included, I only want to display the top most parent posts as options.

    Any thoughts on how to accomplish this using the default Attributes > Parent select field or via custom meta fields?

    thanks

Viewing 1 replies (of 1 total)
  • Thread Starter shagdirty

    (@shagdirty)

    Dug up a solution for this via the in-ter-net. This creates a custom meta box and apparently WP looks for a parent_id which doesn’t necessarily need to be in the default Attributes meta box. Place this in your functions.php file and change the custom post type name as applicable. hope this helps someone.

    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 1 replies (of 1 total)
  • The topic ‘Only allowing users to select top level post/pages as parent’ is closed to new replies.