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
Add venue title to widget output | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Add venue title to widget output

Add venue title to widget output

Posted: March 9, 2013 at 3:13 am

Viewing 6 reply threads


kapow99504

March 9, 2013 at 3:13 am

I’m trying to add the venue title to my Widget output but can’t seem to get the widget.php to pull in the correct information, any advice?


Lovehistory

March 9, 2013 at 1:27 pm

The widget doesn’t pull any of the venue information in from the database if your using the venue manager so you’ll have a little more work to do.

You need to alter the SQL query to include the venue table and the venue relationship table, then within the for each loop assign a venue_name variable and use that within the widget as you would anything else.

Look into event_list.php and it’ll help you along.


kapow99504

March 9, 2013 at 2:21 pm

Thanks Tony, I’ll check it out


Lovehistory

March 9, 2013 at 2:45 pm

I’ve just had a quick look at this.

The SQL function starts from line 49 in widget.php

I’ve added the Venue database calls into the SQL query.

Replace the if statment from lin 49 down to the close } for the ‘else’ not sure on line number as I’ve already alter it.

http://pastebin.com/q35N96Wp

After that look at line 91 onwards… copy line 93 (should be about the event name)

Paste it below on line 94 and change all instances event_name to venue_name on that line.

then you can just use $event->venue_name for example echo $event->venue_name

Only had a quick look but that should work. Let me know if you have problems. Don’t forget to copy widget.php uploads/event-espresso/templates.


Lovehistory

March 9, 2013 at 2:48 pm

I can’t post code so to explain > is a greater than sign.

As in, shift and period (full stop) on most qwerty keyboards.


Lovehistory

March 9, 2013 at 2:49 pm

lol nevermind, hopefully you know what I mean.


kapow99504

March 10, 2013 at 4:32 pm

Worked like a charm, thanks Tony!

Viewing 6 reply threads

The support post ‘Add venue title to widget output’ 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