Support

Home Forums Event Espresso Premium Place event description before ticketing/datetimes on single event page

Place event description before ticketing/datetimes on single event page

Posted: August 10, 2014 at 5:43 am


fifthsense

August 10, 2014 at 5:43 am

Hi guys
I want the text I enter on the edit event page to appear at the very top of the single event page, before the ticketing selection boxes. AT the moment it is after, as you will see here:
http://www.fifthsense.org.uk/events/conference2014
I’ve had a search on the forum but couldn’t see an explanation of how to do this so far – could you please let me know how to do it?
Thanks


Lorenzo Orlando Caum

  • Support Staff

August 10, 2014 at 4:15 pm

Hi,

Try adding this to your child theme’s functions.php file or a site specific plugin:

https://gist.github.com/lorenzocaum/ae1d5cb69d23152b4262


Lorenzo


fifthsense

August 11, 2014 at 8:48 am

Ok thanks, I’ve done this – now is there another piece of code I can add in to remove the datetimes from the page completely? I’d rather just have the events description followed by the ticketing options.
Many thanks


Lorenzo Orlando Caum

  • Support Staff

August 11, 2014 at 9:18 am

Try this in your child theme’s stylesheet or a plugin like My Custom CSS or Reaktiv CSS builder:

.single-espresso_events .event-datetimes {display:none;}


Lorenzo


fifthsense

August 12, 2014 at 6:13 am

Hi
Although the code you gave me worked initially, today it broke the site, stopping all content from below the header displaying. Below is the code I entered, for reference.
Any ideas why?
Thanks

add_filter (‘the_content’, ‘my_remove_event_tickets’, 100 );

// remove tickets
function my_remove_event_tickets( $content ) {
remove_filter( ‘the_content’, array( ‘EED_Event_Single’, ‘event_tickets’ ), 120 );
add_filter( ‘the_content’, ‘my_add_event_tickets’, 121);
return $content;
}

// add tickets after the content
function my_add_event_tickets( $content ) {
return $content . EEH_Template::locate_template( ‘content-espresso_events-tickets.php’ );
}


Dean

August 12, 2014 at 6:48 am

Hi,

It’s unusual for code to work initially and then break like that. Can you provide a link tot he page in question which is broken please?


fifthsense

August 12, 2014 at 7:43 am

Hi Dean
I know, that’s what I thought. I tell you what, could you please reply to this to let me know when you’re available to look at the site and I’ll put the code back in as it affects every page on the site and I don’t want to take the site down for longer than strictly necessary.

Thanks


Josh

  • Support Staff

August 12, 2014 at 8:17 am

Hi fifthsense,

I’m afraid that the code that Lorenzo shared with you is incomplete in that it does not check for the Event Espresso post type. Here is an updated snippet that checks for the post type first before altering the order of the content:

https://gist.github.com/joshfeck/1151c89082ccb5c0b478

It avoids the errors you saw because it checks for the correct post type before altering the content.


fifthsense

August 12, 2014 at 8:20 am

Hi Josh
Great, thanks! I’ll give this a go now and report back.
THanks
Duncan


fifthsense

August 12, 2014 at 8:55 am

Ok that seems to be fine, thanks very much Josh.


Josh

  • Support Staff

August 12, 2014 at 2:02 pm

You’re welcome Duncan.

The support post ‘Place event description before ticketing/datetimes on single event page’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso