Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
using venue shortcode with custom view templates | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium using venue shortcode with custom view templates

using venue shortcode with custom view templates

Posted: February 4, 2014 at 11:16 am

Viewing 2 reply threads


Gabriel Solano

February 4, 2014 at 11:16 am

hi
i’m trying to just show events from venue 12 in the calendar table add-on

[ESPRESSO_VENUE_EVENTS id=”12″ template_name=”calendar-table”]
or
[EVENT_CUSTOM_VIEW template_name=”calendar-table” ESPRESSO_VENUE_EVENTS id=”12]

but it does not work? any ideas?


Josh

February 4, 2014 at 7:41 pm

Hi Gabriel,

I’m afraid that the custom templates plugin doesn’t have the built in queries that lets you display events by venue. It’s possible to add them by adding a few lines of code though. First, in the index.php file of the custom templates add-on (to clarify, not the calendar table add-on) where it has the default shortcode attributes (right after line no. 69 you add:

'venue_id'				=> NULL,
'use_venue_id'				=> false,

Then in the main query, right before the Group by ID is added to the query (line 167) you’d add:

//Venue SQL
$sql .= isset($use_venue_id) && $use_venue_id == true ? " AND v.id = '".$venue_id."' " : '';

Now you can use your new shortcode attributes like so:

[EVENT_CUSTOM_VIEW use_venue_id=true venue_id=12 template_name=calendar-table]


Gabriel Solano

February 9, 2014 at 5:29 am

Awesome worked perfectly. thank you soo much

Viewing 2 reply threads

The support post ‘using venue shortcode with custom view templates’ 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 - Staging Server