Returning the event category without a label

Home Forums Calendar Products Events Calendar PRO Returning the event category without a label

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #13670
    Mike
    Participant

    Hi guys

    I want to show the event category on the event list page in the meta table, and I found the :
    <?php tribe_meta_event_cats();
    for this, however it ALWAYS returns the label, even if I don’t want it to.

    If I pass a “space” through the first parameter, it still returns a big ugly space as the label instead of just returning category link.
    <?php tribe_meta_event_cats(" ");
    Really, I wish that function would also not wrap the output in dt/dd. It means I have to add extra styling that shouldn’t be necessary.

    Is there a function call I haven’t found yet that JUST returns the category as a link, and not the label? I’d prefer not to have to hack that function.

    Cheers
    Mike

    #13673
    Mike
    Participant

    Further to this, if I have to hack that function, it’s in

    public/template-tags/general.php

    Is there a way to override this in my local overrides events folder under my theme directory?

    I’d prefer not to hack the code in the template-tags directory, because it’ll get overwritten when you update the plugin.

    Cheers

    #13711
    Rob
    Member

    Hey Mike. I’m pretty sure this is a problem we’ve identified with the code based on a few users reports over the past couple weeks (which we’ve got a fix in the works for our 2.1 release), let me get a dev to double check just to be sure.

    #13745
    Mike
    Participant

    Thanks Rob, looking forward to hearing back.
    For now, I’ve hacked the general.php but I’d prefer not to.

    #13831
    Rob
    Member

    I suspect there is a workaround. Jonah’s hitting the forums this afternoon so let’s see what he can suggest.

    #13914
    Jonah
    Participant

    Hi Mike, take a look at this: https://theeventscalendar.com/support/forums/topic/modifying-tribe_meta_event_cats-output/

    You might also try just using the get_terms() functions on it’s own, querying for the tribe_events_cat taxonomy which is how categories are stored.

    I hope that helps,
    Jonah

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Returning the event category without a label’ is closed to new replies.