WordPress.org

Ready to get started?Download WordPress

Forums

Simple Upcoming Events
Title Break & Date Span (3 posts)

  1. pmj
    Member
    Posted 2 years ago #

    Is it possible to set the date and the title of the event appear on two lines e.g.

    28/08/2011
    Name of Event

    ???

    Also, can you create a date range for events with different start and end dates?

    http://wordpress.org/extend/plugins/simple-upcoming-events/

  2. koendewit
    Member
    Posted 2 years ago #

    Not sure about the date range, but the line break can be done.
    Find simple-upcoming-events.php and then add '<br />' . between $output .= '<li>' . $event_date . and ' <a href="' . $permalink . '">' . htmlspecialchars($post_title) . '</a>';
    So it will become:

    $output = '';
        if($posts) {
          foreach ($posts as $post) {
            $post_title = get_post_meta($post->ID, $event_name_key, true);
            if(empty($post_title)) $post_title = stripslashes($post->post_title);
            $permalink = get_permalink($post->ID);
            $event_date = date($date_format, strtotime($post->event_date));
            $output .= '<li>' . $event_date . '<br>' . ' <a href="' . $permalink . '">' . htmlspecialchars($post_title) . '</a>';
            $output .= '</li>';

    good luck!

  3. pmj
    Member
    Posted 2 years ago #

    That's great, thanks!

    How would I then make the date of the event bold? Also, is it possible to put an extra line space between each event in the list?

    Thanks for your help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic