WordPress.org

Ready to get started?Download WordPress

Forums

More Fields
is it possible: if has field, els, show another ? (4 posts)

  1. zeevm.co.il
    Member
    Posted 1 year ago #

    hi.. is it possible to use "if" on this plugin ?

    i want to do somthing like that:

    if my client filled a certain filled - show it,
    if he didn't and filled another field - show that one.

    http://wordpress.org/extend/plugins/more-fields/

  2. Danno040
    Member
    Posted 1 year ago #

    I've done stuff like this in the past:

    <?php $custom_field = get_post_meta($post->ID, 'custom_field', true); ?>
      <?php if(trim($custom_field) != '') { ?>
        <p><?php $custom_field ?></p>
      <?php } else { ?>
        <p>No custom field set</p>
      <?php } ?>
  3. zeevm.co.il
    Member
    Posted 1 year ago #

    that is great !

  4. danrmejia
    Member
    Posted 1 year ago #

    Very good one, been strugling with isset() and empty() and it didn't work that way. Thanks!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.