[Plugin: Developer's Custom Fields] slt_cf_field_value() returns nothing
-
I’ve defined my custom fields as per the example in the documentation, only slightly modified for my post type “Book”:
if ( function_exists( 'slt_cf_register_box') ) add_action( 'init', 'register_my_custom_fields' ); function register_my_custom_fields() { slt_cf_register_box( array( 'type' => 'post', 'title' => 'Additional info', 'id' => 'book-box', 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'name' => 'reviews', 'label' => 'Reviews', 'type' => 'wysiwyg', 'scope' => array( 'book' ), 'capabilities' => array( 'edit_posts' ) ), array( 'name' => 'extras', 'label' => 'Extras', 'type' => 'wysiwyg', 'scope' => array( 'book' ), 'capabilities' => array( 'edit_posts' ) ) ) )); }The data is stored/updated correctly in the back-end.
When I try to access it on the front-end, in my single view (single-book.php) it shows nothing. I’m using:
<?php echo '<p>Reviews: ' . slt_cf_field_value( "reviews" ) . '</p>'; ?>Am I doing it wrong?
http://wordpress.org/extend/plugins/developers-custom-fields/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘[Plugin: Developer's Custom Fields] slt_cf_field_value() returns nothing’ is closed to new replies.