Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Forum: Fixing WordPress
    In reply to: Hiding Content
    Thread Starter craig.eves

    (@craigeves-1)

    For some reason that didn’t work…

    I have

    <?php if(($options['facebook'] !='') && ($options['twitter'] !='') && ($options['flickr'] !='') && ($options['googleplus'] !='')){ ?>
    <!-- SOCIAL NETWORKS -->
    <h2>Social Networks</h2>
    <ul>
      <?php if($options['facebook'] !='') { ?>
      <li><a href="<?php echo $options['facebook']; ?>" target="_blank">Like us on Facebook</a></li>
      <?php } ?>
      <?php if($options['twitter'] !='') { ?>
      <li><a href="<?php echo $options['twitter']; ?>" target="_blank">Follow us on Twitter</a></li>
      <?php } ?>
      <?php if($options['flickr'] !='') { ?>
      <li><a href="<?php echo $options['flickr']; ?>" target="_blank">Find us on Flickr</a></li>
      <?php } ?>
      <?php if($options['googleplus'] !='') { ?>
      <li><a href="<?php echo $options['googleplus']; ?>" target="_blank">+1 us on Google+</a></li>
      <?php } ?>
    </ul>
    <?php } ?>

    If none of the fields are filled in I don’t want to show anything… currently this code shows nothing regardless of whether the fields are filled in or not

    Forum: Fixing WordPress
    In reply to: Hiding Content
    Thread Starter craig.eves

    (@craigeves-1)

    Just for the record – the code works already as is – but if all the input fields are empty on the admin panel then the <h2>Opening Hours</h2> still shows, but i don’t want it too…

Viewing 2 replies - 1 through 2 (of 2 total)