Remove Venue Link

Home Forums Calendar Products Events Calendar PRO Remove Venue Link

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #797353
    B.
    Participant

    Hi, I’m having the exact same issue as a user listed here: https://theeventscalendar.com/support/forums/topic/remove-venue-link-part-2/

    That topic was closed, so I couldn’t see the exact solution. But what was recommended was to edit ‘venue.php’.

    I have added that file to my child theme, but when I open the file, the only item I see in the venue title <dd> is: <?php echo tribe_get_venue() ?>

    – How is the hyperlink for the venue removed from that?

    Thanks! So hard to stay on top of constant changes when plugins update. And people wonder why users can be hesitant to just arbitrarily upgrade plugins/WP every time an update happens…

    #798899
    Brian
    Keymaster

    Sure I can help you out with this.

    You can actually use a WordPress function to get the Venue Title without a link.

    Try replacing the function tribe_get_venue() with this:

    get_the_title( tribe_get_venue_id() );

    Let me know if that works for you.

    Thanks

    #799280
    B.
    Participant

    Thanks for the reply. This did the trick and I was also able to use it to get rid of the link for organizers as well. Thanks!

    Any idea how ‘future-proof’ this approach is? We removed all the code we had previously added to functions.php to do the same thing, but as we use these same techniques across multiple sites, it’s really tough to stay on top of little changes that aren’t always immediately obvious (another example is an id that added a ‘-0’ to the end for the maps display in v3.8 – broke our styles).

    #799407
    B.
    Participant

    Ugh, spoke too soon. It looks like the List view is also needing to be redone now, as it is now showing links for venues (and I would imagine, organizers).

    Sorry, wish I was a PHP guru, but could use a bit more assistance here. I’m imagining the change should be in ‘/list/single-event.php’, but I can’t determine exactly how to do it. It appears the ‘pieces’ are being put together in the top as an array, but I’m not sure how to adjust so they only pull the name & not make it a list.

    – Can you let me know how to fix this as well (for both venues & organizers). Want to make sure a fix will last a few versions if possible as well…

    Thanks!

    #801330
    Brian
    Keymaster

    Sure I can help out again. You are closer then you think 🙂

    You are in the right file for the list view. The array is just storing the data so no need to get into working with that.

    If you replace this line at the top of the file:

    tribe_get_meta( 'tribe_event_venue_name' )

    With this one:

    get_the_title( tribe_get_venue_id() )

    That will again show the Venue name without a link.

    You should be able to do this same thing with the Organizer at the top of the file and used the other coding you did with the Single Events.

    That should last a long time as a customization as get_the_title is from WordPress and I do not see that going away and the tribe_get_venue_id() is not a function that would usually change.

    Let me know if that worked for you.

    Thanks

    #801458
    B.
    Participant

    Hi Brian,
    OK, thanks again for the help. This seems to have done the trick. I may have even tried something like that, but an extra parenthesis or semicolon here or there does not work so well in PHP 😉 I wish I had time to learn, but there are only so many hours in a day and so many other things to stay on top of.

    Hopefully this will hold up for a while. I’ll implement on the other sites we have.

    Thanks!

    #801546
    Brian
    Keymaster

    Great, glad it helps, I am going to go ahead and close this ticket, but if you need any other on something else please post a new ticket.

    Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Remove Venue Link’ is closed to new replies.