Support

Home Forums Event Espresso Premium EE Add-On shortcodes not working

EE Add-On shortcodes not working

Posted: March 30, 2016 at 4:37 am

Viewing 8 reply threads


redpaint

March 30, 2016 at 4:37 am

Hi, I am really struggling to get EE4 to work the way I want it. We have the Everything license, but when I add the shortcode within the theme via do_shortcode, it doesn’t work properly. i.e. Calendar doesn’t display and the grid view on the taxonomy page doesn’t show the grid in its proper format and also shows events outwith that category. There must be a conflict that I just can’t see. Any help would be appreciated.


Tony

  • Support Staff

March 30, 2016 at 5:03 am

Hi there,

Which shortcodes are you adding via do_shortcode?

[ESPRESSO_CALENDAR] and [ESPRESSO_GRID_TEMPLATE]?

Can you link use to the pages so we can view what is happening please?

Also can I ask why you are using do_shortcode and not adding the shortcode within the content?


redpaint

March 30, 2016 at 5:17 am

Unfortunately, we are still working off a testing site, so don’t want to post it publicly just now (unhelpful I know)

We may not have set this up correctly, or the approach is wrong, however, with the [ESPRESSO_CALENDAR], we wanted this to appear within the Sidebar, so it was added within sidebar.php. It seems to add in the code, but not populating it fully. For the [ESPRESSO_GRID_TEMPLATE], we want to override the default category page, so that it just displayed a text description followed by the grid of the Events. that fall within. Is creating archive-espresso_events.php with [ESPRESSO_GRID_TEMPLATE] correct?


Tony

  • Support Staff

March 30, 2016 at 5:37 am

[ESPRESSO_CALENDAR], we wanted this to appear within the Sidebar, so it was added within sidebar.php. It seems to add in the code, but not populating it fully.

There’s a Calendar Widget that may be better here.

If you go to Appearance -> Widgets.

You’ll find the ‘Event Espresso Calendar Widget’ that can be placed within a sidebar, would that work?

For the [ESPRESSO_GRID_TEMPLATE], we want to override the default category page, so that it just displayed a text description followed by the grid of the Events. that fall within. Is creating archive-espresso_events.php with [ESPRESSO_GRID_TEMPLATE] correct?

That template would be used for the default event list archive (by default the slug is /events/) but you mention category page above, is it the event list you want to change and just display the espresso grid there?

What you could do is setup a new page an include the ESPRESSO_GRID_TEMPLATE shortcode on that, then direct your users to that page instead. You can even change the ee ‘Events’ slug to something different if you want to use /events/ as the event list without modifying the templates?


redpaint

March 30, 2016 at 6:00 am

Thanks for your help – I will give that a try.

For the ESPRESSO_GRID_TEMPLATE, I am actually looking to display this on the pages domain.com/event-category/slug/ – so it would be the taxonomy-espresso_event_categories.php file? Looking at it a bit more, the /events/ page is displaying correctly with Grid view, but the categories are not (pulling out all events and not displaying in a grid)


Tony

  • Support Staff

March 30, 2016 at 6:09 am

Without viewing the page it’s hard to say what is happening.

Is the test site publicly available? If so can you send login details using this form:

https://eventespresso.com/send-login-details/

I can then view what you are referring to.


Tony

  • Support Staff

March 30, 2016 at 12:40 pm

Hmm, ok so the problem is the CSS and JavaScript files are not being loaded on the category output.

However the strange part is that the current template actually works the way it does, it doesn’t seem to call any other templates, the header, footer etc but the output does actually show that.

I’m guessing the theme is doing some form of pre-processing and working that out for you? (which would be strange).

I tested a similar template to yours based on twentyfourteen, like this – http://take.ms/HZHa8

That works as expected and displays the grid of events, so this could be something to do with how your theme is loading.

However there a couple of issues here, the grid template shortcode is not going to work how you are expecting, it pulls in its own set of events within its own query and then displayed the events from that query in the grid. So with your templates your basically telling WordPress to pull in all of the events within a specific category (by navigating to that output) then telling the Grid Template add-on to pull in all of the events and display them. The grid will not display the events for the category you have navigated to in the way you need them to.

That output is not how the grid template was expected to be used, if you going to use the grid template like that you’ll need to build out the template based on the add-on and not call the shortcode.


redpaint

March 31, 2016 at 4:11 am

Hi Tony,

Thank you for looking into this. We are using https://roots.io/sage/ so that may explain how the theme is pulled together.

We will work on an alternative way to pull it together


Tony

  • Support Staff

March 31, 2016 at 7:57 am

Reg. Sage.

It must be, although I did check into it when viewing the template and could not see how it was doing it. However I did not go through all of the code for the theme.

Please let us know how you get on, if you have any further questions just let us know 🙂

Viewing 8 reply threads

The support post ‘EE Add-On shortcodes not working’ 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