Home › Forums › Calendar Products › Events Calendar PRO › To create a new list widget or not that is the question.
- This topic has 6 replies, 2 voices, and was last updated 8 years, 7 months ago by
Ken Charity.
-
AuthorPosts
-
August 3, 2017 at 12:02 pm #1330309
Ken Charity
ParticipantI have a situation that I was using the list widget to quickly display the next 5 events on the home page in a widget area.
I was only showing the event title, start date/time and end date/time. However, I didn’t want the title to link to the single-event pages because this was a single page site. So in my child theme I was able to make a copy of the widget output file (tribe-events > pro > widgets > list-widget.php) and edit it just how I wanted it to be.
Later I was asked if I could make a button to all the events, so I edited that back into the code. Then the site started to grow into more than just a single page site. So I created the pages needed for the calendar and single-event pages and created a custom header so the nav buttons worked on secondary pages.
Finally, on the single-event pages I wanted to show the list of events in the sidebar. But since I edited the list widget now the links didn’t work for the titles, and I wanted them to for this application (but still leave the home page without links).
So what is the easiest solution here? Is it possible to duplicate the widget, and have one version modified and the original version?
August 5, 2017 at 8:16 am #1331173Ken Charity
ParticipantThis reply is private.
August 7, 2017 at 3:31 pm #1331841Jennifer
KeymasterHi Ken,
Thanks for reaching out!
First, I want to mention that the plugin has a default calendar page, as well as single pages for each event that you create. It sounds like you may have created new pages for all of your events and for the default calendar? One thing to note is that you will not see an “Events” page in your Pages list. You can get to it by going to yourdomain.com/events (or you can change the URL by going to Events > Settings > General > Events URL Slug).
To display the titles on the home page without links, the easiest method would probably be to conditionally wrap the titles in the link using ! is_home() or ! is_front_page() (in the widget template you edited before) to check if you are on the home page. That should allow you to use the widget in both places. Does that answer your question? Please let me know if that works for you or if you need any help implementing it!
Thanks,
Jennifer
August 18, 2017 at 4:45 pm #1337605Ken Charity
ParticipantHi Jennifer,
I see how you could have thought that I created pages based off my initial thread. No I didn’t create actual pages in WordPress. I understand how TEC works in that sense, sorry for the confusion.
I get what you mean about using conditionals with the widget template. That may be the way to go. I appreciate your efforts.
Thanks
KenAugust 19, 2017 at 12:21 am #1337662Jennifer
KeymasterNo problem, Ken. I do think the conditionals would be the easiest method here…trying to duplicating the widget would involve quite a bit more development work.
If you get stuck with the code, please let me know and I’ll be happy to help!
Thanks,
Jennifer
September 10, 2017 at 9:35 am #1347259Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘To create a new list widget or not that is the question.’ is closed to new replies.
