Add date to title on event page

This topic contains 4 replies, has 2 voices, and was last updated by  Stephen Harris 10 years, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6866

    Is there some (easy) way to add the date of an event to the title on the page (e.g. not to the actual title of the event)?

    For example, when I select an event from the calendar or widget, I then don’t see any date (unless I put it in the description text). e.g. http://therecreationclub.com/events/city-to-surf-2013/

    thanks,

    Sue
    #6870

    Hi Sue,

    Does your theme contain an single-event.php. If it doesn’t then the plug-in automatically adds event details to the event’s content (e.g. see http://wp-event-organiser.com/demo/events/event/monthly-event/).

    If you’re not seeing that content perhaps your theme’s single.php doesn’t contain the_content() (or there is a conflict?). But in any case, you can display the event’s dates by creating a single-event.php. The easiest way is to duplicate single.php and then add in functions to display an event’s date(s).

    Keep in mind that the single event page isn’t tied to any one specfic occurrence. See documentation for these functions for displaying an event’s date(s):

    Alternatively, in your single-event.php you can put:

    <?php eo_get_template_part('event-meta','event-single'); ?>
    

    to include event details.

    This page summarises how to edit the templates: http://wp-event-organiser.com/documentation/editing-the-templates/

    Stephen Harris
    #6871

    Thanks Stephen. I’m pretty sure my earlier attempt to create a single-event page met with disaster (because I didn’t follow the instructions!).

    I’ll give this a go though. Thanks again!

    Sue
    #6879

    Okay. Not getting it. Sorry.

    I’m assuming that something needs to go here:<!-- Display event title -->
    <h1 class="entry-title"><?php the_title(); ?></h1>
    but I’m a bit (a lot) fuzzy on what it would need to be.

    I really must get a better theme, too. It took me ten minutes just to find the single.php.

    Sue
    #6882

    Hi Sue,

    That’s right :). Drop me an email via this form and I’ll take a look for you.

    Stephen Harris
Viewing 5 posts - 1 through 5 (of 5 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.