Support

Home Forums Event Espresso Premium Need php and shortcode for specific event list

Need php and shortcode for specific event list

Posted: January 1, 2013 at 3:53 pm

Viewing 3 reply threads


Karen Strange

January 1, 2013 at 3:53 pm

Hi,
I’m new to editing/adding php code, but my client would really like to see the Events Calendar and a list by location-date on the homepage. You can see it here: http://www.newbornbreath.dawnshuck.com/

I managed to find some answers and I’ve got the calendar on the homepage using:
echo do_shortcode(‘[ESPRESSO_CALENDAR]

That was easy enough, but I haven’t been able to recreate the Upcoming Events list.

There’s a great example of this in the EE widget provided. See the upcoming events list in the sidebar of any of the other pages, eg http://www.newbornbreath.dawnshuck.com/events/ Could you tell me the php that I can use to recreate this?

Much appreciated, Dawn

  • This topic was modified 11 years, 10 months ago by Karen Strange.


Dean

January 2, 2013 at 2:11 am

Hi Karen,

There are a few ways you can do this, depending on exactly what you need and the level of complexity.

1) use the EVENT_LIST shortcode on the page (either in the WordPress editor or like you did in your example via PHP) [EVENT_LIST limit=5 sort=DESC] this will limit the number and sort in a descending fashion. The main drawback with this is it does not produce a list as such, but includes dates, prices etc.

2) Use a Page Template to add a sidebar to the home page so you can show the widget. If you edit the Page that is designated as the front page you will see you can add Templates. These are provided by the theme and normally there are a few options (one sidebar, two sidebars, full width no sidebars, etc). Downside is you may see other widgets on the home page which you dont want on that page.

3) Create a custom Page Template for the home page that includes a widget friendly area (sidebar) and drop in the Upcoming Widgets. This is a bit more complex but allows you to create a unique sidebar solely for the home page, and also allows you to place that sidebar where you want it to go.


Karen Strange

January 2, 2013 at 2:57 pm

Hi Dean,

Thank you for responding. I definitely need to go with option #1 as there are other aspects of the homepage that work perfectly. Based on the shortcode info I’ve found on the EE site, I was able to get close with this:

<?php echo do_shortcode('[ESPRESSO_VENUE show_expired="true" show_description="false" show_address="false" show_map_image="false" show_image="false" show_additional_details="false"]');

That gives me the name of the venue (which for this site is the city, state). I need to also make it an active link and add whatever shortcode or php will pull the F j, Y of the event. Each item in the list would be a link that looks like this:

Oakland, CA – July 15, 2012
Oakland, CA – July 15, 2012

Is it possible to get that php code here in the forum or is it best to purchase a support ticket?

Thanks,
Dawn


Chris Reynolds

  • Support Staff

January 7, 2013 at 10:40 am

@Karen
We don’t provide specific customization examples via the support forums or support tokens. We can point you in the general direction but anything that would require code specific to your site would need a custom development request. What you are asking for would need to be done as a modification to the ESPRESSO_VENUE shortcode or a new, custom shortcode. The shortcodes are all in /includes/shortcodes.php.

Viewing 3 reply threads

The support post ‘Need php and shortcode for specific event list’ 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