WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
[resolved] tribe_get_current_month_text() Not working on customized gridview.php (10 posts)

  1. mc_marie
    Member
    Posted 1 year ago #

    Using plugin version 2.0.9

    Been using the documentation on http://tri.be/support/documentation/events-calendar-themers-guide/ and tri.be/support/documentation/the-events-calendar-template-tags-calendar-grid-functions/ to customize my templates.

    Only one issue: I can't get the code for tribe_get_current_month_text() to work above my calendar. I have surrounded it with php and an h2 tag, but it's still not working. Can this function/command work on gridview.php?
    <h2><?php tribe_get_current_month_text(); ?></h2>

    please advise!

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    Hi there mc_marie. Thanks for the note, and for reaching out here. Glad to hear you're finding some value in the documentation/new user primer.

    Not sure about this one myself, but let me see if Jonah from our dev team has any ideas. Stay tuned - should have you a response no later than tomorrow. Cheers!

  3. mc_marie
    Member
    Posted 1 year ago #

    Thanks for the response to let me know someone's watching this forum... looking forward to possible solution(s)

  4. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    We are indeed :) We generally only hit this forum 1x a week due to our limited support bandwidth, but I'll have someone take a look at your issue in the timeframe mentioned in my last note. Thanks!

  5. jonahcoyote
    Member
    Posted 1 year ago #

    Hi mc_marie,

    That function does not return anything by default so you need to put an echo in front of it like so:

    <h2><?php echo tribe_get_current_month_text(); ?></h2>

    This is typically the case with any function that include "get" like get_the_title() or get_the_content(), etc.

    Does that help?

    - Jonah

  6. mc_marie
    Member
    Posted 1 year ago #

    Yes, that helps! I'll try that and report back.
    Thank you!

  7. Barry
    Member
    Posted 1 year ago #

    How did you get on with this mc_marie - did Jonah's code work for you?

  8. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    Going to mark this one resolved, mc_marie, as it's been a month and we haven't heard back. Please let me know if I've done so in error.

  9. mc_marie
    Member
    Posted 1 year ago #

    Thanks for the reminder about this - honestly, the client had decided to move forward without the revision so I hadn't tried it.
    The code you provided with the echo command worked.
    Thank you.

  10. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    Fantastic! Thanks for confirming as much - glad to hear we're all set here. If you need anything else in the future, don't hesitate to ask.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic