Remove link to the event location

Home Forums Calendar Products Events Calendar PRO Remove link to the event location

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1009017
    Sören
    Participant

    Hi there,

    i want to remove the link to the event location in the meta(?) of a single event.

    • This topic was modified 10 years, 6 months ago by Sören.
    #1009309
    George
    Participant

    Hey Sören,

    Thanks for reaching out! You can do this by adding the following code snippet to your theme’s functions.php file:


    add_filter( 'tribe_get_venue', 'tribe_support_1009017' );

    function tribe_support_1009017( $venue ) {
    echo wp_strip_all_tags( $venue );
    }

    Try this out and let us know if it helps! 🙂

    Cheers,
    George

    #1009323
    Sören
    Participant

    Hi George,

    it works but then the name without the links appears on the top of the page:

    <body class="single single-tribe_events postid-1032 tm-isblog tm-article-blog wp-tribe_events-single tm-navbar-bg tribe-bar-is-disabled tribe-theme-yoo_helios_wp tribe-events-page-template tribe-is-responsive">HÄKKEN – Bar + Bühne

    #1009677
    George
    Participant

    Hey Sören,

    I’m really sorry about that! Unfortunately this leaves only one alternative method of doing this, which is to make a custom version of the file /wp-content/plugins/the-events-calendar/src/views/modules/meta/venue.php

    No, don’t worry about recreating the whole file, you do not have to do that! You can just copy and paste the original file, and then add the duplicate to your theme as described in this article → https://theeventscalendar.com/knowledgebase/themers-guide/

    Once you have the file set up in your theme’s new /tribe-events folder, simply take this original line:


    <dd class="author fn org"> <?php echo tribe_get_venue() ?> </dd>

    And replace it with this:


    <dd class="author fn org"> <?php echo wp_strip_all_tags( tribe_get_venue() ); ?> </dd>

    I hope that helps!

    George

    #1010153
    Sören
    Participant

    Yes! Thanks 🙂

    #1010544
    George
    Participant

    Nice! I’m sorry that it required such a relatively-involved customization to do that, but am glad you got it working for now.

    Best of luck with your site! 🙂
    George

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Remove link to the event location’ is closed to new replies.