adding venue/organizer title to the header

Home Forums Calendar Products Events Calendar PRO adding venue/organizer title to the header

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1133913
    Gabrielle
    Participant

    Good morning!

    I need to add the venue and organizer names to the header of my pages. I’ve been modifying my header.php to include titles from various calendar pages. The following code correctly displays “test” on a venue page:

    elseif ( get_query_var('post_type') === 'tribe_venue') {
    echo '

    test

    ';
    }

    I want it to dynamically pull the venue name so depending on what page you’re on, that’s the title that displays. I’ve gotten as far as this:

    elseif ( get_query_var('post_type') === 'tribe_venue') {
    $venue_id = get_the_ID();
    echo '

    '.$venue_id.'

    ';
    }

    However, it returns a “0”. I can’t seem to figure out what I’m missing. Any thoughts?

    Thanks so much!

    #1134185
    Gabrielle
    Participant

    Got it! Here is the code if anyone is wondering how this is done

    
    elseif ( get_query_var('post_type') === 'tribe_venue') {
         $venue_id = $wp_query->post->post_title;
         echo '<h1>'.$venue_id.'</h1>';
    }
    
    • This reply was modified 9 years, 9 months ago by Gabrielle. Reason: fix code
    #1134202
    Geoff
    Member

    Nice, you rock Shawn! I was just in the process of opening this thread up and saw you had already figured it out. Seriously awesome work and thanks for sharing. 🙂

    Have a great day!
    Geoff

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘adding venue/organizer title to the header’ is closed to new replies.