Question about migrating fields to code

Support General Question about migrating fields to code

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #48274
    Julia MayhughJulia Mayhugh
    Participant

    I have created several a bunch of meta box fields for a custom post type, and I'm trying to move these fields to an mu-plugin. I have exported the PHP for these fields from the Meta Box UI and added it to my custom plugin, however when I make changes to the field code (such as changing a field description), I'm not seeing it in the post edit screen for the post type.

    Do I need to also remove the field from the Meta Box UI? Or else how do I ensure that the field config comes from the plugin and not the database?

    #48278
    PeterPeter
    Moderator

    Hello Julia,

    Yes, you also need to remove the field group from the builder (UI). If it still doesn't work, you can try to copy the code and put it in the file functions.php in the theme folder and recheck the issue.
    If it works, I think your custom plugin is loaded before Meta Box plugins so the code doesn't work in this case.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.