• Resolved amandathewebdev

    (@amandathewebdev)


    Hello, I added a CPT called “Portfolio.” It is not displaying in my admin menu. When I go to: Registered Types and Taxes, it says I have nothing registered. When I got to add the CPT again, it says it’s already registered.

    I deleted the plugin, added it again twice. The Portfolio CPT is still registered, so I can’t re-add.

    After that I added a CPT called “work” and this showed up for me. But, because of the way the permalinks/url structure work, I need it to be “portfolio” not “work”.

    I have two other plugins activated: Akismet and Advanced Custom Fields.

    https://wordpress.org/plugins/custom-post-type-ui/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Does the Import/Export area show anything in the right side textarea?

    Not sure why nothing is showing up in the “Registered Post Types” area, unless somehow it’s not saving to the options table at all.

    Thread Starter amandathewebdev

    (@amandathewebdev)

    No, there’s nothing in the text box under Import/Export. How could I troubleshoot whether or not it’s saving to the options table?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    If both textareas are empty outside of some generic message, then the options aren’t being saved for some reason. The question is why, and I don’t know as I’ve never seen that happen myself.

    Thread Starter amandathewebdev

    (@amandathewebdev)

    But when I go to add “Portfolio” again, it says it’s already registered. With the way the urls get structured, I need it to be /portfolio/

    Any recommendation on where to go from here?

    Also, this has happened to me before. What I did was delete and re-add the plugin. That didn’t work this time.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    At this point, I’d double check your theme/plugins for any that may be using that post type slug. It also could be a page slug.

    In the code, I check if it’s part of the CPTUI saved post types already, check if it’s a reserved slug from WP core, and check if it’s already been registered as a post type elsewhere. Then I compare to page slugs.

    In this case, we know already that we don’t have any saved values from CPTUI, so it’s not that. “portfolio” isn’t going to be a reserved slug from core. So that leaves it being registered elsewhere, or matching a page slug.

    Just out of curiosity, have you managed to save any other post types successfully? Or have you just been trying with “portfolio” since that’s the one you need?

    Thread Starter amandathewebdev

    (@amandathewebdev)

    My theme is custom and the only plugins I have are: Akismet and ACF. So it’s not a conflict there.

    So are you saying that if I have a page slug “Portfolio” I can’t have a CPT called portfolio?

    Yes I saved “Work” successfully but I can’t have it called that because of then the link will be domain.com/work, when I need it to be domain.com/portfolio

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Correct. I’ve had support threads in the past regarding post type slugs and page slugs matching and causing confusing 404 errors, because WordPress ends up not querying for the expected thing and other issues. In the case of matching page slugs, is WP supposed to query for a page? or a post type archive?

    Thread Starter amandathewebdev

    (@amandathewebdev)

    I thought I could have a CPT that would be domain.com/portfolio/post-title AND have domain.com/portfolio (page). The CPT would live on the page “Portfolio.” Perhaps instead, I could use a taxonomy? Do taxonomies create archives?

    Thread Starter amandathewebdev

    (@amandathewebdev)

    I deleted the page and the post type is now registered. Is there an archive page option? I just need a hub for these posts that can have a URL that makes sense with the portfolio post type.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    If you set the post type settings in CPTUI to say “has archive: true” then WordPress core should take care of the rest. Visiting domain.com/portfolio/ with a post type slug of “portfolio” and no page with a matching slug, would then show the post type archive.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘CPT registered by not showing up’ is closed to new replies.