Display only one of two custom fields. (1 post)

  1. thorbj
    Posted 4 years ago #

    I bumped in to a problem while using custom fields.
    In some of my posts I have 2 custom fields. One (Dato) with the date of a coming event, an a second one (expiration) with expiration date of the event.

    I use this to display posts sorted by the date in Dato field, and remove posts if the date in the expiration field is passed. This works great.

    BUT, I also use the Dato field to show a brief list of upcoming events on the top of my page. To do this, I have put the following code (in pastebin) in my header.

    Instead of just showing the date populated in the Dato field, and the title of the posts as a link, it also shows the date in the expiration field.

    Hope anyone can help me with this.

    Thanks in advance.

Topic Closed

This topic has been closed to new replies.

About this Topic