Home › Forums › Ticket Products › Event Tickets Plus › Removing the "Organiser" name link from event?
- This topic has 6 replies, 2 voices, and was last updated 10 years, 11 months ago by
Josh.
-
AuthorPosts
-
March 6, 2015 at 3:33 pm #946629
James
ParticipantHi,
I want to remove the link from the organiser’s name on the front end of the event listing.
As I am the only organiser of any event and the website already provides detail of who I am I want the organiser to be a name and not linked to another page.
Thanks in advance for any assistance.
James
March 7, 2015 at 10:45 am #946705Josh
ParticipantHey James,
Thanks for reaching out to us!
You can modify the way the organizer details are displayed by following our Themer’s Guide to copy the views > modules > meta > organizer.php file from the core Events Calendar plugin into your theme and modifying the content their to meet your needs.
Let me know if this helps.
Thanks!
March 7, 2015 at 2:21 pm #946734James
ParticipantThanks for the reply Josh,
I understand the principles of moving copies of files into my Theme folder to modify etc.
What I am having trouble with is finding which bit of code I need to modify to remove the link from the organiser’s name. I still want the name to show but not have it link to anything.
I don’t see any code in the views > modules > meta > organizer.php file relating to the Organizer’s name link. So I’m not sure what I need to modify in this file.
The only file where I found code that says anything about organizer link is > public > template-tags > organizer.php on lines 115 to 145 (see below) but I don’t know what to change. When I did try to modify this file, I got a white screen on the whole website.
/**
* Organizer Page Link
*
* Returns the event Organizer Name with a link to their single organizer page
*
* @param int $postId Can supply either event id or organizer id, if none specified, current post is used
* @param bool $full_link If true displays full html links around organizers name, if false returns just the link without displaying it
* @param bool $echo If true, echo the link, otherwise return
*
* @return string Organizer Name and Url
*/
function tribe_get_organizer_link( $postId = null, $full_link = true, $echo = true ) {
$postId = TribeEvents::postIdHelper( $postId );
if ( class_exists( ‘TribeEventsPro’ ) ) {
$url = esc_url( get_permalink( tribe_get_organizer_id( $postId ) ) );
if ( $full_link ) {
$name = tribe_get_organizer( $postId );
$link = ! empty( $url ) && ! empty( $name ) ? ‘‘ . $name . ‘‘ : false;
$link = apply_filters( ‘tribe_get_organizer_link’, $link, $postId, $echo, $url, $name );
} else {
$link = $url;
}
if ( $echo ) {
echo $link;
} else {
return $link;
}
}
}Cheers
James
March 7, 2015 at 2:47 pm #946740James
ParticipantIf the the link can’t be removed, I would be happy if I could change the link URL.
March 7, 2015 at 3:07 pm #946742James
ParticipantA quick update!
Although not a perfect solution, I have created a 301 redirect from the old organiser link URL to somewhere more useful on my site, the about me page, and that seems to work.
March 10, 2015 at 10:05 am #947311Josh
ParticipantHey James,
I’m glad you were able to find a temporary solution! Looking at this further I noticed the issue you mentioned about not being able to easily remove the link being added to the title.
I created a gist of the “organizer.php” with the updated Organizer name without the link applied to it. You can find that here https://gist.github.com/BeardedGinger/b62b0d022412c3e2b010.
Let me know if this helps.
Thanks!
May 10, 2015 at 9:22 pm #961707Josh
ParticipantHey James,
It’s been a while since we’ve heard from you.
I’ll go ahead and close this thread for now. If you have any further questions, please don’t hesitate to open a new thread.
Thanks!
-
AuthorPosts
- The topic ‘Removing the "Organiser" name link from event?’ is closed to new replies.
