• Hi. I’m liking this plugin!

    I’m developing a new site (WordPress 3.0, working locally with XAMPP 1.7.3).

    I added a checkbox field (named ‘r22cb’ ) to my custom post type, but I can’t the value of it into my theme. I have tried:

    <p>Checkbox: abc<?php get_ept_field( 'r22cb' ); ?>def </p>

    <p>Checkbox: abc<?php the_ept_field( 'r22cb' ); ?>def </p>

    Regardless of the state of the box, both appear to return a NULL, and the output in my theme is:
    Checkbox: abcdef

    I examined the database with PHPmyAdmin. When the box is checked on the post the value is set to ‘on’, it’s NULL if the box is unchecked.

    Am I missing something here? Thanks in advance for any help.

    http://wordpress.org/extend/plugins/easy-post-types/

Viewing 1 replies (of 1 total)
  • TJList,

    No you aren’t missing anything! This got me stuck too. There’s just a bug in the plugin. Go to line 63 of classes/custom-checkbox/custom-checkbox.php and change this line:

    $value=$this->load_fields(array('postid'=>$postid, 'field_name'=>$name));

    to:

    $value=$this->load_fields(array('postid'=>$post->ID, 'field_name'=>$name));

    and that should do it!

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP Easy Post Types] Get Checkbox value in Theme’ is closed to new replies.