Home › Forums › Calendar Products › Events Calendar PRO › Link Widget Title to Specific Calendar
- This topic has 7 replies, 2 voices, and was last updated 11 years, 6 months ago by
Brook.
-
AuthorPosts
-
August 5, 2014 at 10:39 pm #593511
chrisdm
ParticipantIs there any easy way to link specific calendars from widgets. Ideally would be nice to link from the widget title.
August 7, 2014 at 3:06 am #603108Brook
ParticipantHowdy chrisdm,
I would love to help, but I am not 100% sure I follow the question. What do you mean by “Specific calendars”? Can you perhaps provide a link to one? Armed with the knowledge of what you want, hopefully I can help you do it. Cheers!
– Brook
August 10, 2014 at 12:46 pm #631783chrisdm
ParticipantThis reply is private.
August 12, 2014 at 1:24 pm #652734chrisdm
Participantbump
August 13, 2014 at 1:11 am #656831Brook
ParticipantHowdy chrisdm,
Ooops! I am sorry, I mean to get back to you on this yesterday. Please pardon my delay.
I understand now. Each calendar is a category. It sounds like you want to do is have a List of the upcoming events for each calendar displayed as a widget on your site, and for that widget to link to the calendar and have a matching title. This part can be done very easily. Simple go to WP Admin > Appearance > Widgets, and add the Events List widget to your theme area. Under filters, select the category you want it to show. Under title, type in the category name. Save. You will notice on the front end it has the proper title, and at the bottom a link to “View more…” which takes you to that specific calendar/category.
If you require that the title itself links to the category, you are in for a harder time. It is going to require some PHP dabbling since WP Widget titles are not mean to be links. If you want to turn one into a link, you will have to create a custom theme for it. The easiest way is probably to have a widget area dedicated to each widget, and a hardcoded title/link above each. Thn when you add the widget, just leave the title blank input box so it does not output that on the frontend in addition to your hardcoded one.
Does that make sense? Will that work for you? Please let me know. Cheers!
– Brook
August 13, 2014 at 4:08 pm #660919chrisdm
Participantthanks, I see why i’m confused, I think there is a conflict in the uber-menu, if you look at the url I sent in private email there is a singular widget in footer area that shows the link but when added to uber-menu the link doesn’t appear with the widget (hover over events).
If I did decide to create a separate template fore each widget is their a naming convention so that I could choose the correct widget in wordpress backend. I already have a single modified template at theme/tribe-events/widgets/list-widget.php.
August 14, 2014 at 10:50 pm #671390Brook
ParticipantWe have been having email issues today. I did not actually get your email yet. Our host is looking into the problem.
I don’t think the email woes will delay us a bit though. I was referring to modifying your current WordPress Template. It looks like you are using a Genesis theme of your own design. Wherever you want those three widgets to show up, instead of creating a single widget area you can create three. If you have create a custom template this will be the easiest option by far. Once you have three widget areas, you can them code in the surrounding HTML right into your template, and thus specify any title and link you please.
If you prefer to create a theme override for/widgets/list-widget.php you could do that too. I think the best strategy for that will be to include a widget header right inside of the template. First you should check if $link_to_archive === true, which would indicate that the current widget is linking to a category. If so, you would want to get the proper name for $term[0] which will be the name of the category. Output that name as a title and wrap it in a link with the href being $link_to_all. This will all make a lot more sense when the file is open. 😀
Hopefully that helped! Let me know if I can be of further assistance. Thanks!
– Brook
October 13, 2014 at 9:41 pm #809166Brook
ParticipantSince this topic has gone for a spell without a response I am going to archive it. If you do need anything else please feel free to open a new topic. Cheers!
– Brook
-
AuthorPosts
- The topic ‘Link Widget Title to Specific Calendar’ is closed to new replies.
