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.

So I am trying to add an extra box in the WP post dashboard. In this box I will add a piece of HTML code.

This code created the box in the WordPress area:

$woo_metaboxes[] = array (  "name" => "brand",
                            "label" => __( 'Brand', 'woothemes' ),
                            "type" => "textarea",
                            "desc" => __( 'Enter brand code now.', 'woothemes' ) );

Now, I have to pass a function in the the functions.php file, which I did like this:

if ( ! function_exists( 'canvas_get_brand' ) ) {
 function canvas_get_brand() {

….
…

<div class="post-brand">
<?php echo $brand; ?>
</div><!-- /.post-brand -->
<?php
}
} // End canvas_get_brand()

I tried my best, but I am not able to find a way out to add the right code to get this "dynamic content" box to work. What should I do next? How do I add/pass an argument?

I am using canvas theme, which has a pretty nice hooks feature.

Any help is highly appreciated.

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.