WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. hippoi
    Member
    Posted 2 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?

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

  2. Andy Fragen
    Member
    Posted 2 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
    Member
    Posted 2 years ago #

    Thak you, is perfect

  4. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 2 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

About this Topic