Posted: November 26, 2018 at 7:05 am
|
Hi, |
Hi there, To add details to the widget you’ll need create your own custom version of the widget, add the location to the output using PHP and then use that custom widget in place of the original. By location do you want the venue name or address? For venue name you can use I have an example of how you can create your own custom version of the EE widget here: |
|
|
I have added this piece of code: <p> I need to customise it to show the events location, what should I change? |
|
if ( $show_dates ) { Is this correct? Ive added the code to the query(and also to the above section where you define instances) |
It looks like you’re trying to make customizations to the Widget’s settings panel. You’ll actually need to make the edits the output, which starts on line 346 of the code Tony shared with you. |
|
|
Hi Josh, |
Can you be more specific with your question? What exactly do you want to display, and where? For example, you mention you want to display the location, does that mean you want to display the name of the venue, the address (and what parts of the address), or both the name & address. Also, where do you want that information to be displayed? |
|
|
Sure! thanks for helping. Thats it. Sounds easy but I am messing around with this for too long :/ Thanks |
This is fairly easy to do, but up until now you’ve not given any details of where you wanted to display the details within the widget itself or what actual venue details you wanted to use. Rather than using the functions I mentioned above for the above, you can use something like this:
Add that between these two lines: So it will look something like:
You can wrap the output in p tags (or any other HTML tags) if you prefer. The above changes you made are incorrect and will need to be removed. Also, make sure you are now using the ‘Custom Event Espresso Upcoming Events’ in Appareance -> Widgets and not the default one from Event Espresso for the above to work. |
|
|
Thanks for your help, Its working as expected. |
The support post ‘event location in upcoming events widget’ 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.