Support » Plugin: Convert Post Types » Worked but doesn't respect hierarchy settings for CPT

  • Hi Stephanie

    This is a great plugin, and would work very well for anyone who just needs to convert from a Post to a CPT or a Page to a CPT if they don’t need to keep page hierarchy support, however, when I just converted a bunch of Pages to a new CPT setup for those pages, I cannot choose any of them as a Parent page in my new CPT, even though my CPT does support page-attributes and has hierarchy set to true. In order to be able to select them as a Parent Page, I’ll have to manually re-enter them as New and delete the ones I converted, which defeats the purpose of using this plugin.

    Is there any chance you can modify your plugin to fix this soon? I have a big project looming and was just testing this on a sandbox site in anticipation of needing to convert a large number of Pages to the new CPT….I really don’t want to have to manually enter all that data again and would prefer to use the plugin if it can recognize the Page support for the CPT.


Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Stephanie Leary


    I’ve never had a problem using converted posts as parents. Did you by chance set them to a status other than published? WordPress doesn’t let you use draft/private/pending posts as parents.

    No, they were published, but to be clear, they were originally Pages, not Posts, although I don’t know if that makes a difference.

    I set this up on a brand new sandbox installation of WP (3.8.1) with the database imported from my live site (the one that has all the Pages I need converted to a CPT)….same thing happened – it converts the Pages to the new CPT perfectly, but I cannot choose any of the newly converted Custom Posts as a Parent when I add a new Custom Post. Only Custom Posts I add after that are available to choose as Parents.

    I’m sort of stuck and hoping for a solution….

    Maybe someone can suggest a SQL query that will let me modify the post type for a bunch of pages that are all child pages of one page, to a custom post type? I’m comfortable making changes using phpMyAdmin, but don’t know much about writing SQL queries.

    Plugin Author Stephanie Leary


    That’s VERY strange. I have never encountered it on my own sites. If you want me to investigate further, I’d be happy to work with your database export (if you feel like letting me see that). Just email me.

    The query would look something like:

    UPDATE wp_posts SET post_type = 'myposttype' WHERE post_parent = n

    (where n is the ID of the parent page and myposttype is the name of your CPT)

    Hi Stephanie, sorry for the delay in replying, I finally had time to look at this.

    That SQL query worked like a charm……and now my newly converted pages can be used as the parent page for the CPT, so I’m all set!

    Many thanks for you help. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Worked but doesn't respect hierarchy settings for CPT’ is closed to new replies.