Removing the "Organiser" name link from event?

Home Forums Ticket Products Event Tickets Plus Removing the "Organiser" name link from event?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #946629
    James
    Participant

    Hi,

    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

    #946705
    Josh
    Participant

    Hey 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!

    #946734
    James
    Participant

    Thanks 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

    #946740
    James
    Participant

    If the the link can’t be removed, I would be happy if I could change the link URL.

    #946742
    James
    Participant

    A 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.

    #947311
    Josh
    Participant

    Hey 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!

    #961707
    Josh
    Participant

    Hey 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!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Removing the "Organiser" name link from event?’ is closed to new replies.