Forums Forums Search & Filter Pro Using CPT for search filter

Tagged: 

Viewing 6 posts - 11 through 16 (of 16 total)
  • Trevor
    #115268

    Is it just this bit that doesn’t work?

    <?php tribe_events_list_the_date_headers(); ?>
    

    What HTML does it normally output. Use the snippet back ticks to enclose code.

    snippet backticks

    Anonymous
    #115829

    Hi Trevor,

    I have managed to get this working now, however, the code repeats itself and adds the month header on top of each event when it is meant to list all events of a single month in one header e.g all events in may should be listed under the may header but it currently adds the may header to each event in may. Please see below for code that is in the results.php file:

    `
    if ( $query->have_posts() ) { ?>

    <div id=”tribe-events-content” class=”tribe-events-list”>
    <div class=”events-loop tribe-events-loop vcalendar”>
    <div class=”row”>
    <div class=”tribe-events-page-title-wrap” style=”position: relative; text-align:center;”>
    <h2 class=”tribe-events-page-title”>All Events</h2>
    </div>

    <?php while ($query->have_posts()) { $query->the_post(); ?>

    <?php if ( ! defined( ‘ABSPATH’ ) ) { die( ‘-1’ ); } // Setup an array of venue details for use later in the template $venue_details=t ribe_get_venue_details(); if ( isset( $venue_details[ ‘linked_name’] ) ) { $venue_name=$ venue_details[ ‘linked_name’]; } elseif ( isset( $venue_details[ ‘name’] ) ) { $venue_name=$ venue_details[ ‘name’]; } else { $venue_name=” ; } // Venue $has_venue_address=( ! empty( $venue_details[ ‘address’] ) ) ? ‘ location’ : ”; // Organizer $organizer=t ribe_get_organizer(); ?>

    <?php do_action( ‘tribe_events_inside_before_loop’ ); ?>

    <!– Month / Year Headers –>
    <?php tribe_events_list_the_date_headers(); ?>

    <?php do_action( ‘tribe_events_inside_after_loop’ ); ?>
    `

    code for the event loop then goes here followed by:

    `
    <?php } else { echo ‘<div class=”upcoming-event-title” style=”padding:10px; background-color:#454545;”>
    <p style=”text-align:center; color:white;”>
    Oops! There are no events found matching your search selection. </p>
    </div>’; } ?>
    `

    The main bit of code that makes the month header work is below:

    `
    <?php tribe_events_list_the_date_headers(); ?>
    `

    It may be easier to show you the code and explain the issue in a call if the this is confusing.

    Thanks,
    Ihtezaz

    Trevor
    #115868

    That might be a better idea. I am just going out for lunch but will be back (if my Skype shows green, I will be here, it is currently yellow, away).

    Anonymous
    #117149

    Hi Trevor,

    Could we please go over this today if possible? Am I ok with giving you a call when you’re available?

    Thanks,
    Ihtezaz

    Trevor
    #117286

    I am struggling to get the time to do take a call today, so it will have to be bumped into tomorrow.

    Trevor
    #117637

    So, we swapped out the theme code that you had used for pagination and added back in our standard pagination, and then installed the WP-PageNavi plugin. Hopefully that will get you up and running.

Viewing 6 posts - 11 through 16 (of 16 total)