• Resolved dovidev

    (@dovidev)


    I’ve created a pod custom post type that has worked great. Now I’ve also created an entire plugin around it. Obviously, it would be better to just have the custom post type in the plugin instead of in pods. Is there a good way to duplicate a pod in PHP. It would be fantastic if I could simply generate the code for a pod or a pod export. This would help me with this pod and would also make it easy to build with pods and then move post types over to php.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @dovidev

    See https://developer.wordpress.org/reference/functions/register_post_type/
    You can register a CPT by code but if you use custom fields you’d still need Pods. Pods handles the UI and storage of these fields.

    Cheers, Jory

    Thread Starter dovidev

    (@dovidev)

    I recognize that I could build it from scratch with register_post_type and a meriad of other functions. What I’m saying is it would be great if there were a way to take an already built pods CPT and convert it to PHP with some kind of tool. Does anything like that already exist?

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @dovidev

    There is a very old addon that supposed to do something like this: https://github.com/pods-framework/pods-export-code

    But honestly this isn’t the way to go. At least I’m unfamiliar with this legacy code since it’s over 7 years old.
    Besides, registering a custom post type hardly takes any time if you know a bit of PHP.
    But as I said, any custom fields or templates made with Pods will require the Pods plugin. That is the whole purpose of this plugin 😉

    Cheers, Jory

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

The topic ‘Pods to PHP Custom Post Type’ is closed to new replies.