WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom Post Type - Not Saving Custom Meta Data (4 posts)

  1. Courtney Fantinato
    Member
    Posted 2 years ago #

    Hi everyone,

    I'm having trouble with a plugin I'm creating. I have created a custom post type, and it has a custom meta box. However, the data input into the form in this meta box is not being saved. I can see that the keys are being created in the DB, but the values for them are not (they're just empty).

    Can someone take a look at the code and see if I'm missing something or there's an error? I'll just post the part for saving as registering the custom post type and creating the meta box is working fine.

    Thanks!

    [38 lines of code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

  2. Courtney Fantinato
    Member
    Posted 2 years ago #

    Sorry, here it is on Pastebin.

  3. Courtney Fantinato
    Member
    Posted 2 years ago #

    Anyone? I have found some "solutions" but nothing works.

    I have put an updated code sample on Pastebin, including the code creating the custom meta box.

  4. Courtney Fantinato
    Member
    Posted 2 years ago #

    The problem has been solved. The nonce check was causing problems.

Topic Closed

This topic has been closed to new replies.

About this Topic