Support

Home Forums Event Espresso Premium Right Direction

Right Direction

Posted: August 20, 2017 at 6:40 am


rhumphrey

August 20, 2017 at 6:40 am

Hello,

I need to alter the events list quite elaborately, adding dynamic SVG images, popup and contact forms (screenshot attached below). What I have done so far is to create my own shortcode and use a lot of hooks to connect to event espresso functionality (also attached)

how it should look like
code
code

now there’s a growing concern that i may need to use a 3rd party plugins ie: for say to recalculate final pricing after commission.

Can I check if I am going the right direction in development, or should i find a way to alter [ESPRESSO_EVENTS] shortcodes to change visual and stick to using that shortcode for listing events?

your enlightment would be highly appreciated


rhumphrey

August 20, 2017 at 6:41 am

sorry.. i was uploading images on img.ur, and paste on the img button above.. it doesnt look like it loads the image properly. Please “right click > open image in new tab” to preview.


rhumphrey

August 20, 2017 at 7:10 pm

Hello,

I need to alter the events list quite elaborately, adding dynamic SVG images, popup and contact forms (screenshot attached below). What I have done so far is to create my own shortcode and use a lot of hooks to connect to event espresso functionality (also attached)

how it should look like
code 1
code 2

now there’s a growing concern that i may need to use a 3rd party plugins ie: for say to recalculate final pricing after commission.
Can I check if I am going the right direction in development, or should i find a way to alter [ESPRESSO_EVENTS] shortcodes to change visual and stick to using that shortcode for listing events?

Your enlightment would be highly appreciated


Josh

  • Support Staff

August 22, 2017 at 10:25 am

Hi there,

I’d actually recommend not creating new shortcodes. What you can do instead is start with this guide:

https://eventespresso.com/wiki/ee4-custom-post-types/#archive_event_template

then you can also copy over the template parts from the public/Espresso_Arabica_2014 folder and put the copies into your active WordPress child theme. Then you modify those templates. The main template for the [ESPRESSO_EVENTS] shortcode is named content-espresso_events-shortcode.php


rhumphrey

August 22, 2017 at 8:22 pm

Hi Josh, appreciate your direction.

I’ve tried a quick test, and I manage to add visuals to [ESPRESSO_EVENTS] shortcode. However now I have a further question..

I need to add other functionalities like pagination. says I need to use [EVENT_LIST events_per_page=10] however it sounded as if the whole page need to be dedicated to host this shortcode?

I have content above and below the shortcode to be displayed, and it looks like when i put in the [EVENT_LIST] shortcode, it only shows just a text.. can help with another direction for the manual to setup the [EVENT_LIST] shortcode please?

Thanks in advance


Josh

  • Support Staff

August 23, 2017 at 6:47 am

Hi there,

The [ESPRESSO_EVENTS] shortcode will accept a limit parameter which will add pagination. The documentation shows more parameters:

https://eventespresso.com/wiki/ee4-shortcodes-template-variables/#event-listings

There isn’t actually an [EVENT_LIST] shortcode included in Event Espresso 4.


rhumphrey

August 23, 2017 at 7:58 am

HI josh, going back to the template layout file, I have followed the instructions that you have listed above, im still a little confused about something though, this archive-espresso_events.php allows he to change and remove things like the side bar, comments, admins etc etc. but do i use this same template to create the layout in the image in my third comment. the reason i ask is this, i have copied index.php which has no reference to the events and how the event list itself is laid out. i know this is working as i added some simple text and it shows on the page displaying my events. but how do i actually go about modifying my event layout as in the image and still maintaining the [event_espresso] shortcode, as there is no link between the new template in my child theme and the structure and content of the actual event list. This is really bugging me. so if you can give me some clear and precise instructions i would really appreciate it.

many thanks

Ryan


Josh

  • Support Staff

August 23, 2017 at 8:11 am

Hi Ryan,

I can give you clear and precise instructions if you can clearly outline exactly what it is you’re trying to do.

If you’re confused about which template displays which content, you can add the following to each template to know where it’s loading from:
echo '<h1>' . __FILE__ . '</h1>';


rhumphrey

August 23, 2017 at 8:22 am

Hi Josh, ok let me start again. we got a little confused in the beginning with creating and changing the event list. So my devloper created a new shortcode and then hooked into everything, as he was understanding correctly. what im trying to get is this I have already built this, hooked into EE and everything is working as i want, the issue is now the shortcode, you have advised us to use the [event_espresso], which is fine.\

so where am i now. ok

1. i have copied the index.php to child theme and renamed it to archive-espresso_event.php and updated the functions.php file with the relavent code as stated in the instructions. This is working as i added some basic text to that file. as seen here

this is diplaying correctly the text so i know the template is working good.
ok so;

that template file does not contain any information about the structure of the actual event list and how it is laid out and displayed as it is here:

my question is which file do i actually need to configure to display the event list with the correct shortcode, not removing the sidebar or, admin name, etc. but the actual event. the way each event is listed as in the first image i have in this message with our custom shortcode.

thanks


Josh

  • Support Staff

August 23, 2017 at 8:36 am

You’ll copy over to your theme the
content-espresso_events-shortcode.php file from the Event Espresso plugins /public/Espresso_Arabica_2014 folder

Then you’ll make edits to the code between
<?php elseif ( is_archive() ) : ?>
and
<?php endif; ?>

You’ll note there are some calls to get template parts, you can re-order/reuse those or even modify those templates and/or reuse code from those as well.


rhumphrey

August 23, 2017 at 9:57 pm

Hi josh

thanks for that, that is exactly what i needed and been looking for.i would suggest updated the documentation as i couldn’t find anything that reflected this.

again, many thanks

Ryan

The support post ‘Right Direction’ 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