WordPress.org

Ready to get started?Download WordPress

Forums

conditional repeating content (1 post)

  1. accounts@push
    Member
    Posted 2 years ago #

    hi there i am trying to make a contact section where there are various different types of contact ect. e.g skype:, Ph:, Fax:, Email:

    currently i am using the settings API to store my data and display it after my contact section like so

    PH: <stored setting>
    emial: <stored setting>

    what i want to do is get the PH: part to disappear if there is no stored data for its corresponding contact element i.e if there was no phone number entered into the theme options then it would look like this

    PH:
    Email: exmaple@example.com
    Fax: 313 4565 5678
    Skype: joe.bloggs

    I want it to look like this is if there was no number enterred into the PH: field on my settings page

    Email: exmaple@example.com
    Fax: 313 4565 5678
    Skype: joe.bloggs

    any ideas?

    currently the code im using looks like this and it isnt working

    if($options ['phone_string'] == "NULL" || "" || " " )
       echo "";
    else
       echo "PH: ";

Topic Closed

This topic has been closed to new replies.

About this Topic