Home › Forums › Calendar Products › Events Calendar PRO › Disable Links to 'Venue' Pages on List View
- This topic has 4 replies, 3 voices, and was last updated 10 years, 6 months ago by
Support Droid.
-
AuthorPosts
-
September 29, 2015 at 4:21 pm #1009860
B.
ParticipantHi, I’m looking for a little direction on disabling the links that are automatically added to venue titles and link to a ‘venue’ page for each venue. We would rather not hassle with having to style those pages, and it’s not a way that our users would need to be able to view events.
I’ve looked in the Themer’s Guide and explored the views & templates that seemed obvious, but couldn’t find where the links are added. I thought it would be in the ‘list > single-event.php’ file, but that appears to pull the venue meta from somewhere else that I can’t locate.
– Can anyone point me to the template that needs to be updated/overwritten, or better yet give an example of a function that might be able to just lose the hyperlink on the venue titles??
It’s only in seen in list view, and we can certainly hide it with CSS if we have to, but it would better to remove the link altogether. I suppose we’ll have to also add logic to our robots.txt file so those pages aren’t indexed.
Would be easier if there was a setting to disable those altogether if not using. Thought there was, but maybe I’m thinking of another calendar plugin we’ve used in the past.
September 30, 2015 at 8:32 am #1010060Brian
MemberHi,
Thanks for using our plugins I can help out here.
There is not settings to disable fields on the front end, so the themer’s guide is the way to go to make changes.
This is the correct file:
plugins/the-events-calendar/src/views/list/single-event.php
Move that to your theme following the guide and then under this function:
$venue_details = tribe_get_venue_details();Add this:
if ( is_array( $venue_details ) ) {
if ( isset( $venue_details['name'] ) ) {
$venue_details['name'] = get_the_title( tribe_get_venue_id() );
}
}That should then remove the link.
Let me know how that works out.
Thanks
September 30, 2015 at 10:59 am #1010131B.
ParticipantPerfect. Thank you.
I had a knew which file it should be in, but am not fluent in PHP so didn’t know how to code the proper function to strip the link out. Hopefully this might help others trying to lose the venue links.
So now would putting ‘Disallow: /venue/’ in my robots.txt be sufficient to stop those ‘pages’ from getting indexed? Or can they show up in any other URL structure?
Thanks again!
September 30, 2015 at 11:49 am #1010167Brian
MemberGreat glad it helps.
I think that should work in your robots.txt but I am not an expert on that so I cannot say for sure.
You might have to add nofollow to the template.
I found this that might work:
http://wordpress.stackexchange.com/a/105599
The Venue Post Type is:
tribe_venue
And Organizer is:
tribe_organizer
October 15, 2015 at 7:05 am #1014885Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Disable Links to 'Venue' Pages on List View’ is closed to new replies.
