WordPress.org

Ready to get started?Download WordPress

Forums

WP Calendar
Template: show "-" only if there is an end date or time (3 posts)

  1. MacDoodle
    Member
    Posted 3 years ago #

    Current template is:

    <p><strong>{event_startdate} - {event_enddate}</strong><br />
    {event_subject}<br />
    {event_starttime} -  {event_endtime}<br />
    {event_location}</p>

    Is there a way to make the dash "-" show up only if there is an end date or end time available?

  2. MacDoodle
    Member
    Posted 3 years ago #

    Resolved - found the info in the usage section. But now I have another related question:

    <p><strong>{event_startdate}{event_enddate; before=" - "; }</strong><br />
    <i>{event_subject}</i><br />
    {event_starttime hideifallday=1; }{event_endtime; hideifallday=1; before=" - "; }<br />
    {event_location}<br />
    {event_description}</p>

    If there is no "time" because it is an all day event, the line break leaves a gap between the subject and the location that I don't want there.

    I tried using before="
    " on the event_starttime tag. Didn't work. And using after="
    " on the event_subject tag.

    Any other solution I'm missing?

  3. MacDoodle
    Member
    Posted 3 years ago #

    Oops! One more time...

    I tried using
    before="<br />"
    on the event_starttime tag. Didn't work.
    And using
    after="<br />"
    on the event_subject tag.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic