Link Widget Title to Specific Calendar

Home Forums Calendar Products Events Calendar PRO Link Widget Title to Specific Calendar

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #593511
    chrisdm
    Participant

    Is there any easy way to link specific calendars from widgets. Ideally would be nice to link from the widget title.

    #603108
    Brook
    Participant

    Howdy 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

    #631783
    chrisdm
    Participant

    This reply is private.

    #652734
    chrisdm
    Participant

    bump

    #656831
    Brook
    Participant

    Howdy 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

    #660919
    chrisdm
    Participant

    thanks, 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.

    #671390
    Brook
    Participant

    We 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

    #809166
    Brook
    Participant

    Since 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

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Link Widget Title to Specific Calendar’ is closed to new replies.