James

Forum Replies Created

Viewing 91 post (of 91 total)
  • Author
    Posts
  • in reply to: Removing the "Organiser" name link from event? #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

Viewing 91 post (of 91 total)