ThemeShaper Forums » Thematic

[closed]

meta box nonce error and not echoing in child theme

(5 posts)
  • Started 8 years ago by notlaura
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. I'm having some trouble adding a metabox to the post editing page in my child theme.
    I am getting this error on the name of my nonce field:
    Notice: Undefined index: wpfolio_meta_box_nonce in ... line 82.

    I have been messing around with the code for the meta box a lot - deleting and renaming functions, ids, etc. Is it possible the database is corrupt or confused somehow? I'm working locally on a test site so the data isn't too important.

    The meta box seems to be saving the data; when I go to update a post the content I entered is still in the field and the fields show up in the Custom Fields box. But I haven't been able to echo the fields' content into the post. I am using this function to echo:

    // Display meta box input in post footer
    function display_metabox_in_post() {
    	global $meta_box;
    	$fields = $meta_box['fields'];
    
    	echo '<?php get_post_meta($post->ID, $fields["_collab"], true); ?>';
    	echo '<?php get_post_meta($post->ID, $fields["_dimen"], true); ?>';
    }
    
    add_action('thematic_belowpost', 'display_metabox_in_post');

    But all that echoes is this:

    ID, $field["_collab"], true); ?>
    ID, $field["_dimen"], true); ?>

    See all of the code here.

    Any help greatly appreciated. Thanks!

    Posted 8 years ago #
  2. i would add

    global $post;

    to your function

    Posted 8 years ago #
  3. also pertaining to metaboxes i think WPAlchemy is beyond awesome.

    http://farinspace.com/wpalchemy-metabox/

    Posted 8 years ago #
  4. No difference with $post, but thanks. I saw you posted WPAlchemy on a couple other threads - I'll give that a try :)

    Posted 8 years ago #
  5. bummer then. sometimes it is a magic bullet. do try WPAlchemy. you can do super easy all the way to super advanced (i just put together a monster box with it).

    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.