Get the list widget title

Home Forums Calendar Products Events Calendar PRO Get the list widget title

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1357930
    Aaron Simms
    Participant

    I’m customizing the list widget template, which I plan to use on some pages via the shortcode, and I want to be able to work with the widget title as defined in the shortcode (title=”XYZ”) but I cannot for the life of me determine which Tribe function gets the widget title. Currently the list widget shortcode with title=”XYZ” just outputs plain text (XYZ) above the widget. I’ve tried tribe_get_events_title() but that just outputs the stock “Upcoming Events” title, not XYZ. Is there another variable I need to pass to that function?

    If this is something that should be done using the WordPress the_widget function then what widget class should I be targeting? Thanks.

    • This topic was modified 8 years, 7 months ago by Aaron Simms.
    • This topic was modified 8 years, 7 months ago by Aaron Simms.
    #1358656
    Victor
    Member

    Hi Aaron!

    Thanks for reaching out to us! Let me try to help you with this topic.

    The widget title is part of the the_widget() function > https://codex.wordpress.org/Function_Reference/the_widget so, to customize the widget title you would have to make use of the widget_title filter > https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title

    I think you’ll want to target the Tribe__Events__List_Widget class located at /wp-content/the-events-calendar/src/Tribe/List-Widget.php

    I hope that helps. Let me know if you have other questions.

    Best,
    Victor

    #1359144
    Aaron Simms
    Participant

    Thanks Victor. I finally got the title where I needed it.

    #1359464
    Victor
    Member

    Hi Aaron!

    Good to know you could work it out! Thanks for following up to let us know.

    I’ll close this thread now, but feel free to open a new topic if anything comes up.

    Best,
    Victor

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Get the list widget title’ is closed to new replies.