Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am new to php and I am using wpalchemy to create a custom metabox. I want to output the info from the metabox on a template page, not inside a loop. I have tried the following to no avail per the documentation on wpAlchemys site. Side note I want to create a custom metabox with the ability to upload multiple images is wpalchemy a good starting point to do this.

<?php
    global $custom_metabox;
    $custom_metabox->the_meta();
    $custom_metabox->the_field('name');
    $custom_metabox->the_value();
?>
share|improve this question
add comment

1 Answer 1

try specifying the ID of the post for which you need to get data from:

$custom_metabox->the_meta(101);
share|improve this answer
    
I Tried $custom_metabox->the_meta(2); based on my url /wp-admin/post.php?post=2&action=edit to no avail –  Anders Kitson Mar 14 '12 at 17:25
    
I am actually trying to do this with the image uploader tutorial off your site. The multiple image uploader metabox is working, but I don't know how to output it on my template –  Anders Kitson Mar 14 '12 at 17:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.