Event date before title

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 10 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9485

    Hi!
    I´m using Headway Themes and a custom template built opon that framwork. And the event-organiser pro.

    When i click on a event on the widget calender it shows the “title of the show” in the next lines the other venue related information. However I would like that the title would show the “date” before “title text”. This should probably be done in the single -event template files. Does anyone have in hints how I should proceed?

    Thanks for any help in this matter!

    Niklas Forsberg
    #9489

    This will only really work for non-recurring events since for recurring events there is only one page for all occurrences. But you simply need to insert eo_the_start( $format ); somewhere before the title (the_title()).

    $format here can be any format you like- you might like to change it according to whether the event is an all day event or not. get_option('date_format') and get_option('time_format') return the date and time format as they are set in the Settings > General.

    If your theme has a single-event.php you could put it there. If not, you could do one of two things:

    1. Add it to your single.php but only for events:

    if( 'event' == get_post_type() ){
          eo_the_start( $format );
    }

    2. Create a a copy of single.php, named single-event.php and add the line

     eo_get_template_part( 'event-meta', 'event-single' );

    wherever you want the ‘event details’ to appear (this is typically immediately above the_content().

    Mileage will vary though, as some themes won’t call the_content() in single.php – but instead include another template file, which contains it.

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.