Home › Forums › Calendar Products › Events Calendar PRO › How do I remove the url link from the 'Venue' on the widget?
- This topic has 9 replies, 2 voices, and was last updated 7 years, 7 months ago by
Pam.
-
AuthorPosts
-
August 21, 2018 at 1:47 pm #1602500
Pam
ParticipantHey – I’ve reviewed the documentation on the themers guide, created ‘views’ in my own theme & was able to do a couple of things to ‘single-event.php’. However, I can’t unlink the ‘venue’. The code looks like this:
<?php echo $location; ?>
I can’t figure out what other template/view this might be located in (and trust me – I’ve searched).
1. I just want the venue to be plain text (no link).
2. and then I need to add another link that goes to each ‘event’ in the list.Can you help direct me? The site is still in development.
Thanks,Pam
August 22, 2018 at 5:57 am #1602906Pam
ParticipantOk – I found the link. It’s here: the-events-calendar > src > functions > template-tags > venue.php
WHERE do I put this in my child theme in order to override that function & remove the ??
Thanks! Pam
/**
* Returns or display the event Venue Name with a link to the venue
*
* @since ??
*
* @param int $postId Can supply either event id or venue id, if none specified, current post is used
* @param bool $full_link If true outputs a complete HTML link, otherwise only the URL is output
* @return string Venue if $display is set to false, void if it’s set to true.
*/
function tribe_get_venue_link( $postId = null, $full_link = true ) {$venue_id = tribe_get_venue_id( $postId );
$url = esc_url_raw( get_permalink( $venue_id ) );if ( ! class_exists( ‘Tribe__Events__Pro__Main’ ) ) {
$link = tribe_get_venue( $venue_id );
} elseif ( $full_link ) {
$name = tribe_get_venue( $venue_id );
$attr_title = the_title_attribute( array( ‘post’ => $venue_id, ‘echo’ => false ) );
$link = ! empty( $url ) && ! empty( $name ) ? ‘‘ . $name . ‘‘ : false;
} else {
$link = $url;
}August 22, 2018 at 5:59 am #1602909Pam
Participant/**
* Returns or display the event Venue Name with a link to the venue
*
* @since ??
*
* @param int $postId Can supply either event id or venue id, if none specified, current post is used
* @param bool $full_link If true outputs a complete HTML link, otherwise only the URL is output
* @return string Venue if $display is set to false, void if it’s set to true.
*/
function tribe_get_venue_link( $postId = null, $full_link = true ) {$venue_id = tribe_get_venue_id( $postId );
$url = esc_url_raw( get_permalink( $venue_id ) );if ( ! class_exists( ‘Tribe__Events__Pro__Main’ ) ) {
$link = tribe_get_venue( $venue_id );
} elseif ( $full_link ) {
$name = tribe_get_venue( $venue_id );
$attr_title = the_title_attribute( array( ‘post’ => $venue_id, ‘echo’ => false ) );
$link = ! empty( $url ) && ! empty( $name ) ? ‘‘ . $name . ‘‘ : false;
} else {
$link = $url;
}August 22, 2018 at 6:00 am #1602910Pam
Participantthe editor is deleting the actual tags from the code …
August 23, 2018 at 10:59 am #1604312Jennifer
KeymasterHi Pam!
You can actually use this snippet to unlink the venue name (if you don’t want to unlink the organizer, then you can remove that part from the snippet). This can be added to the functions.php file of your child theme. The venue and organizer pages are only linked when Pro is active, so the code that links the name is actually in that plugin.
Please let me know if this works for you! We are limited in the amount of support that we can provide for customizations, but if you get stuck or have any questions, please let me know – I’ll be happy to try to point you in the right direction!
Thanks,
Jennifer
August 24, 2018 at 7:29 am #1604897Pam
ParticipantHey there, thanks for the snippet! Unfortunately, it didn’t do anything 🙁
http://www.dotsimple.ca/borealrescue/courses/whitewater-swiftwater/whitewater-rescue-wwr/
It’s placed in the function file (and I did leave the organizer snippet in the code).
https://www.screencast.com/t/AmVQyOy70fP
Thoughts?
August 27, 2018 at 3:30 pm #1607052Jennifer
KeymasterHello,
I just tested out the snippet in my local environment, and it is removing the link on my end. Can you make sure that you’ve cleared out your browser cache and any caching that you might be doing on your site (on your server or via a plugin)? Can you also share your full system info with me?
August 28, 2018 at 9:04 am #1607718Pam
ParticipantHome URL
http://www.dotsimple.ca/borealrescue
Site URL
http://www.dotsimple.ca/borealrescue
Site Language
English
Character Set
UTF-8
Name
pamgreen
Email
[email protected]
Install keysevents-calendar-pro = 2c0b################################e874
tribe-filterbar = 4dce################################c454WordPress version
4.9.8
Permalink Structure
http://www.dotsimple.ca/borealrescue/%postname%/
PHP version
5.6.37
PHPmax_execution_time = 120
memory_limit = 768M
upload_max_filesize = 128M
post_max_size = 128M
display_errors = 1
log_errors = 1Server
Apache
SAPI
cgi-fcgi
PluginsAccordion Shortcodes version 2.3.3 by Phil Buchanan(http://philbuchanan.com)
Advanced Custom Fields: Options Page version 2.1.0 by Elliot Condon(http://www.elliotcondon.com/)
Advanced Custom Fields: Repeater Field version 2.1.0 by Elliot Condon(http://www.elliotcondon.com/)
Advanced Custom Fields PRO version 5.7.3 by Elliot Condon(http://www.elliotcondon.com/)
Advanced Post Manager version 4.4 by Modern Tribe, Inc.(http://m.tri.be/4n)
Checkfront Online Booking System version 3.2 by Checkfront Inc.(http://www.checkfront.com/)
Classic Editor version 0.4 by WordPress Contributors
The Events Calendar PRO version 4.4.31 by Modern Tribe, Inc.(http://m.tri.be/20)
Hello Dolly version 1.7 by Matt Mullenweg(http://ma.tt/)
Instagram Feed Pro Personal version 2.9.1 by Smash Balloon(http://smashballoon.com/)
Max Mega Menu version 2.5 by Tom Hemsley(https://www.megamenu.com)
Post Tags and Categories for Pages version 1.4.1 by curtismchale(http://wpthemetutotial.com/about/)
The Events Calendar: Filter Bar version 4.5.7 by Modern Tribe, Inc.(http://m.tri.be/25)
The Events Calendar version 4.6.22 by Modern Tribe, Inc.(http://m.tri.be/1x)
Unique Headers version 1.7.12 by Ryan Hellyer(https://geek.hellyer.kiwi/)
Widget Options version 3.7.1 by Phpbits Creative Studio(https://phpbits.net/)
Yoast SEO version 8.0 by Team Yoast(https://yoa.st/1uk)
WP Migrate DB Pro version 1.8.1 by Delicious Brains(https://deliciousbrains.com)
WP-PageNavi version 2.92 by Lester ‘GaMerZ’ Chan(http://lesterchan.net)
WP User Avatar version 2.1.5 by flippercode(http://www.flippercode.com/)Network Plugins
–
MU PluginsWP Migrate DB Pro Compatibility version 1.1 by Delicious Brains(http://deliciousbrains.com)
Theme
Boreal River Rescue
Multisite
–
Settingsschema-version = 4.6.22
recurring_events_are_hidden = exposed
previous_ecp_versions =Array
(
[0] => 0
[1] => 4.6.21
)latest_ecp_version = 4.6.22
last-update-message-the-events-calendar = 4.6.21
disable_metabox_custom_fields = hide
tribeEnableViews =Array
(
[0] => list
)pro-schema-version = 4.4.31
donate-link =
postsPerPage = 10
liveFiltersUpdate = 1
hideSubsequentRecurrencesDefault =
userToggleSubsequentRecurrences =
recurrenceMaxMonthsBefore = 24
recurrenceMaxMonthsAfter = 24
showComments =
showEventsInMainLoop =
eventsSlug = rescue-courses
singleEventSlug = rescue-course
multiDayCutoff = 00:00
defaultCurrencySymbol = $
reverseCurrencyPosition =
trash-past-events =
delete-past-events =
embedGoogleMaps = 1
geoloc_default_geofence = 25
geoloc_default_unit = miles
embedGoogleMapsZoom = 10
debugEvents =
tribe_events_timezone_mode = event
tribe_events_timezones_show_zone =
earliest_date = 2018-09-08 00:00:00
earliest_date_markers =Array
(
[0] => 147
)latest_date = 2018-12-04 23:59:59
latest_date_markers =Array
(
[0] => 152
)stylesheetOption = tribe
tribeEventsTemplate = default
viewOption = list
mobile_default_view = list
tribeDisableTribeBar = 1
hideLocationSearch = 1
hideRelatedEvents =
week_view_hide_weekends =
monthEventAmount = 3
enable_month_view_cache = 1
dateWithYearFormat = F j, Y
dateWithoutYearFormat = M j
monthAndYearFormat = F Y
weekDayFormat = D jS
dateTimeSeparator = @
timeRangeSeparator = –
datepickerFormat = 0
tribeEventsShortcodeBeforeHTML =
tribeEventsBeforeHTML =
tribeEventsShortcodeAfterHTML =
tribeEventsAfterHTML =
filter-bar-schema-version = 4.5.7
events_filters_layout = vertical
events_filters_default_state = openWP Timezone
America/Toronto
WP GMT Offset
-4
Default PHP Timezone
UTC
WP Date Format
F j, Y
WP Time Format
g:i a
Week Starts On
1
Common Library Dir
/home/dotsimpl/public_html/borealrescue/wp-content/plugins/the-events-calendar/common/src/Tribe
Common Library Version
4.7.19August 28, 2018 at 9:06 am #1607720Pam
ParticipantHey – yes, the cache has been cleared from my webhost & locally.
It’s inside a widget – does that have relevance?August 30, 2018 at 3:52 pm #1610212Jennifer
KeymasterHi Pam,
Sorry for the confusion here…yes, some of the widgets actually uses a different function to get the linked venue name – if the widget that you’re trying to change uses the tribe_get_venue_link function, try replacing that (via a template override – the single-event.php file that you’ll want to copy and edit can be found at wp-content/plugins/events-calendar-pro/src/views/pro/widgets/modules) with this one:
tribe_get_venue()This is will get that snippet working.
Let me know if this helps! If not, can you please tell me which specific widget you are trying to change (and send me a link to the page where you are using this if possible)?
Thanks,
Jennifer
September 21, 2018 at 9:35 am #1627660Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘How do I remove the url link from the 'Venue' on the widget?’ is closed to new replies.
