tribe_get_venue_details Venue Title Unlinked

Home Forums Calendar Products Events Calendar PRO tribe_get_venue_details Venue Title Unlinked

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1419218
    inhouse
    Participant

    Hello, I’ve been searching through the forums, docs and Google trying to figure out how to show the venue title within the tribe_get_venue_details function without a link.

    I need this:
    $venue_details['linked_name'] = $venue_link;
    without a surrounding link tag. Within that function I see $post_id but cannot return any data from the chosen venue post. The function will be used in my list view single-event.php template. Any help is appreciated!

    #1419234
    inhouse
    Participant

    Ah, I finally solved this. Essentially I replaced the $venue_link variable with tribe_get_venue(). Below is my full function.

    `

    function my_tribe_get_venue_details( $post_id = null ) {
    $post_id = Tribe__Main::post_id_helper( $post_id );

    if ( ! $post_id ) {
        return array();
    }
    
    $venue_details = array();
    
    if ( $venue_link = tribe_get_venue_link( $post_id ) ) {
        //$venue_details['linked_name'] = $venue_link;
        $venue_details['linked_name'] = tribe_get_venue();
    }
    
    if ( $venue_address = tribe_get_full_address( $post_id ) ) {
        $venue_details['address'] = $venue_address;
    }
    
    return apply_filters( 'tribe_get_venue_details', $venue_details, $post_id );
    

    }

    `

    • This reply was modified 8 years, 3 months ago by inhouse. Reason: I don't know why this code isn't formatting completely. It's enclosed properly
    #1419246

    Glad you were able to resolve your issue!  Thanks for sharing, you are welcome back in our support forums any time!

    Since you marked this thread as Resolved, I am going to close this thread.

    Have a great weekend!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘tribe_get_venue_details Venue Title Unlinked’ is closed to new replies.