• Resolved thomhines

    (@thomhines)


    I’ve been working with this plugin for several hours now, and it just doesn’t seem to be doing anything. It could be that it’s not compatible with the latest version of WP, but that seems unlikely since it was released so recently. I’ve installed and activated the plugin, and I know it’s running. Then I’ve dropped the example code in my functions.php file

    <?php x_add_metadata_field( 'field-1', 'post' ); ?>

    and I know that file is loading correctly, but the fields are not showing up in my add post page.

    When trying to debug the plugin, I’ve noticed that it tends to hang up when verifying whether or not my objects (I’ve tried ‘post’ and ‘page’) are registered. If I try to bypass that test, I get errors with the array_key_exists function.

    Any help would be greatly appreciated! Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think there is a small omission in the plugin that causes it not to load when you create a new post, only when you edit an existing one.

    If that is the case for you, you can fix it by adding the post-new.php value to the $_pages_whitelist array, as explained in my other forum post.

    Thread Starter thomhines

    (@thomhines)

    Thanks, Jan.

    Actually, the trouble was that I wasn’t including the admin_init hook stuff, which I thought was optional. Without including it, though, the metadata array was being filled BEFORE the init() function was called, which clears the array. That is all fixed now, though.

    Nevertheless, I’m really glad you you shared that tip with me. I definitely want the option on the post-new.php pages, so your fix really did save me a lot of time and hassle. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Custom Metadata Manager] Custom meta fields not appearing’ is closed to new replies.