WordPress.org

Ready to get started?Download WordPress

Forums

Proper Way To Setup A Custom Post Type Via Plugin Question (1 post)

  1. wilhud
    Member
    Posted 1 year ago #

    After researching custom post types, I have been able to accomplish the following...

    Built a plugin to add a Custom Post Type
    CPT includes taxonomies & meta box data
    Templates added for single and archive pages of CPT

    Everything works as expected, except for these few issues...

    1. Cannot manually assign the CPT template to a page (since it resides in the plugin)
    2. Cannot easily get page name/description from archive template assigned via plugin (page id, title, etc returned are for posts, not for the page itself because the page is not linked to the template)
    3. Page does not display as selected when being viewed (same reason as #2)

    Is there some way to resolve these issues? Maybe I am setting the CPT up incorrectly from the plugin, but I have not been able to locate any documentation on how to set it up differently to avoid these issues. I can post code if needed, but since the coding is very in depth, I'm not sure what would be the best portion to post yet.

    Any help or recommendations are greatly appreciated.

    Thanks,
    Wil

Topic Closed

This topic has been closed to new replies.

About this Topic