Forums

showing custom post type variables only if something has been inputted (1 post)

  1. cpkid2
    Member
    Posted 2 years ago #

    I have a custom post type set up for my portfolio with various meta boxes such as website url, special notes, etc. In the event I don't have any special notes for a particular post, is there a way to not echo that in the template?

    Something like:

    if $website_url does not exist, then don't print Launch <a href="<?=$website_url?>" target="_blank">Website</a>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.