Support

Home Forums Event Espresso Premium Change Post

Change Post

Posted: August 30, 2013 at 9:49 am


Marco Genovese

August 30, 2013 at 9:49 am

I created an event and its associated post.
I have three questions:

1) It’s possible to have the date of the event rather than the date of insertion of the post?
2) It’s posible to obtain the date in Italian and not in English?
3) It’s possible to have “Add to cart button” rather than
the “register link”?

I’m attaching a screenshot so you can realize what I mean.

If it’s possible to make these changes, can you tell me what are the php files that I need to change?

Thanks in advance


Josh

  • Support Staff

August 30, 2013 at 10:08 am

Hi Marco,

Event Espresso uses the event_post.php template to build the content of the post. It can be modified to suit your needs and copied over to /wp-content/uploads/espresso/templates to avoid it getting overwritten on an update.

Any content above or below the post content generated by the event_post.php template is generated by the active WordPress theme’s single post template. Creating a child theme is generally recommended when customizing WordPress theme templates:

http://themeshaper.com/2009/04/17/wordpress-child-theme-basics/


Marco Genovese

September 2, 2013 at 4:03 am

Hi Josh,
thanks for the reply.

In event_post.php I would like to insert the PHP snippet code corresponding to this shortcode: [ESPRESSO_CART_LINK anchor = “BUY EVENT” direct_to_cart = 1 moving_to_cart = “PLEASE WAIT …”] so when the post for the event is created, it has the “add to cart” button automatically inserted.

It’s possible? Can you post the code that I should enter in event_post.php?

Another question: I would like to have in the single.php file of my theme the code that generates the event date and not the date of publication of the post. It’s this possible?

Thanks in advance


Marco Genovese

September 3, 2013 at 2:58 am

Please, someone can answer me?


Tony

  • Support Staff

September 3, 2013 at 6:34 am

Hi Marco,

The shortcode you posted works from within the Event only. You would need to add the event_id attribute to the shortcode for it to work. Check here: https://eventespresso.com/wiki/shortcodes-template-variables/#add-to-cart for available shortcodes.

When using them within a template file you would wrap them in do_shortcode() function: http://codex.wordpress.org/Function_Reference/do_shortcode

The simplest method would be to use the ‘Add to cart’ shortcode you’ve provided, in Event Description within the Event itself (within Event Espresso). This will carry over into the Custom Post Types, then you could hide the register link using CSS.

As for the event date, it is stored within the event post meta under event_start_date.

If your unsure of how to achieve this I would advise contacting one of our Event Espresso Pro’s here https://eventespresso.com/developers/event-espresso-pros/

The support post ‘Change Post’ 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