Posted: June 3, 2015 at 12:44 pm
|
Hi, I have been able to change the look of the Upcoming Events widget via CSS tweaks but there is one thing that I have not been able to figure out: I would like to have the title “Upcoming Events” link to a different page than the default event archive page. Where should I be looking to modify that function? Thanks for your help, Gilda |
Hi Gilda, you can register a new customized version of the widget. Here is an example on how to customize the upcoming events widgets for Event Espresso 4: — |
|
|
Hi Lorenzo, I will do that, thanks. I was wondering which line of code in the widget causes that upcoming Events title to link to the archive page? |
|
ah, never mind… I found it, wasn’t looking far enough down in the code… thank you! GT |
|
On the same subject: This is actually what I was trying to do before trying to change that title url to point to a different page: |
Hi Gilda, changing the URL in your custom upcoming event widget will have it point to the new URL instead of the default events archives page which is similar to example.com/events/: http://cl.ly/image/3g2C2L142x3t — |
|
|
Hi Lorenzo, I tried unregistering the original widget using this code in the child theme’s functions: function remove_original_ee_widget() { add_action( ‘widgets_init’, ‘remove_original_ee_widget’ ); But, I get the same result… Any ideas what I am doing wrong or could this also be a weirdness with the way the theme is structured? |
|
Hi, You were almost there. The widget name was wrong, and you needed to set a higher priority (you didn’t have one):
Just make sure that your new widget has a different name other than Event_Espresso_Widget |
|
Hi Dean, |
|
Hi, OK, I got it wrong!
That will clear the default widget. Add it to the site specific plugin above the widget code. Also, remove this |
|
Hi Dean, Here is the site specific plugin in it’s current state: (is line 33 correct: “Custom Upcoming Events Widget”? It does not seem to change anything if I remove the word Custom…) |
|
OK, seems there was a slight typo in the code
should read
Notice the difference in the id_base? Once change to custom-ee-upcoming-events-widget the widget worked for me. |
|
Thank you so much, that was the missing piece! Gilda |
|
That’s great! Anything else I can help with regarding this topic or can I mark it as resolved? |
|
It is resolved, thanks very much for your help. |
The support post ‘EE4 Upcoming Event 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.