Unlink Category from Single View

Home Forums Calendar Products Events Calendar PRO Unlink Category from Single View

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #23035
    Andrew
    Member

    On the single view event page, there is a field called “Category” with a link to the category the event belongs to. I’d like to remove that hyperlink and just list the category name instead. The single.php file has a php line , but that doesn’t allow me to remove the hyperlink and keep the category name. Where can I make this change?

    #23045
    Andy Fragen
    Moderator

    Try adding the following to your CSS.

    dt.category-label, dd.category-meta { display: none; }

    #23046
    Andy Fragen
    Moderator

    Oops, the above will remove it entirely. Look in your /resources/views/single.php, copy it to your theme/events/ directory and I believe you’ll find the code in that file to remove the hyperlink from the category.

    #23047
    Andy Fragen
    Moderator

    It seems to be populating from the function tribe_meta_event_cats, I don’t know where it is but it’s likely there’s no override as it’s in the core somewhere.

    #23090
    Rob
    Member

    Hey Andrew. Thanks for the note; I believe Andy is correct here and that this is something in the core (which we strongly advise against modifying) but let me check whether anyone on our dev team has any ideas to workaround it. No guarantees but stay tuned and we’ll do what we can.

    #23104

    Hey Andrew, Andy is right about ‘tribe_meta_event_cats’ not being able to print strings without links, but you don’t need to modify core.

    1) Add this to your theme’s functions.php: https://gist.github.com/3232646
    2) Create (if you don’t have it already) a ‘events’ folder in your theme
    3) Copy wp-content/plugins/the-events-calendar/views/single.php to that ‘events’ folder in your theme.
    4) Edit that single.php in your_theme/events/ and replace tribe_meta_event_cats(); with my_tribe_meta_event_cats();
    5) Enjoy 🙂
    6) Let me know if that works as intended.

    #977483
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Unlink Category from Single View’ is closed to new replies.