• Resolved joloshop

    (@joloshop)


    Okay i have a custom taxonomy with two field, now I would like to show one field that is empty (no content) i would like to show another instead, how do i accomplish that?

    I call the main field with:

    <?php echo $stores_info; ?>

    and the one that should show if that would be empty with:

    <?php echo $term->description;?>

    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter joloshop

    (@joloshop)

    Thanks for all the help (ironic) however i found my solution:

    <?php echo $stores_info;
    
        if(trim($stores_info) == "")
        {
            echo $term->description;
    
        }
    
    ?>

    Maybe I can help somebody with this, because not everybody is a geek!

Viewing 1 replies (of 1 total)
  • The topic ‘Show second field if first is empty’ is closed to new replies.