The Events Calendar
[resolved] Category name (4 posts)

  1. hippoi
    Posted 3 years ago #

    I´m try lookin the name of category in the pop-up of day of calendar (file table-mini.php), but it's not ready.

    I´m used teh function get_the_category(), but always return empty

    this es the code:

    $category = get_the_category();
    echo $category[0]->cat_name;

    anybody can help me?


  2. Andy Fragen
    Posted 3 years ago #

    Try this function to get category slugs, if you want the actual name you might need to alter it slightly.

    function getCategorySlugs() {
    $terms = get_terms("tribe_events_cat");
    $slugs = array();
    foreach ($terms as $term) {
    $slugs[] = $term->slug;
    return $slugs;

  3. hippoi
    Posted 3 years ago #

    Thak you, is perfect

  4. Rob La Gatta
    Modern Tribe Support
    Plugin Author

    Posted 3 years ago #

    Awesome to hear that got you where you needed to be, hippoi. Thanks again Andy!

    Looks like we're all set with this issue so I'm going to mark it "Resolved" accordingly. If you need anything else down the road, please just let us know.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • The Events Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic