Support » Plugins and Hacks » Toolset Types » [Plugin: Types – Custom Fields and Custom Post Types Management] Render a field with condition &quot

  • Resolved Agnes

    (@agneslesagegmailcom)


    I would to render a field with a condition “if not empty”, and also to break a line only of the field is not empty.

    The basic code enables do the 1st part, but not the second.
    Any idea?

    <?php echo(types_render_field(“object-date”, array(“show_name” => “true” ))); ?>

    I woudl try with the normal WP grammar, but I wonder why the normal WP code does not render the fields values

    <?php get_post_meta($post->ID, ‘object-date’, true); ?>

    http://wordpress.org/extend/plugins/types/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Amir Helzer

    (@amirhelzer)


    Types adds the prefix ‘wpcf-‘ to the custom field names. Try adding this and you should get the field correctly with the WordPress call.

    Agnes

    (@agneslesagegmailcom)


    Right, that works !
    I knew that was in the table as a normal custom field and could not get why it does not render, only wathcing the table you find out

    Thanks! Agnes

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Types – Custom Fields and Custom Post Types Management] Render a field with condition &quot’ is closed to new replies.