Treehouse: Grow your CSS skills. Land your dream job.

get post meta php help

  • # January 22, 2012 at 11:03 am

    I am using a custom field and need it to echo some text, plus the custom field content if it is true. If not, it does nothing. An example would be

    Fax Number: ===> the text I want echoed if the field is true
    555-555-5555: ===> the custom field if true

    Here is what I got. I have tried some variations with “if” and “else” which did not work.

  • < ?php echo get_post_meta($post->ID, 'fax_number', true); ?>
  • Thanks.

    # January 22, 2012 at 11:45 am

    found my answer :)

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

You must be logged in to reply to this topic.