Forums Forums Search & Filter Pro Using CPT for search filter

Tagged: 

Viewing 10 posts - 1 through 10 (of 16 total)
  • Anonymous
    #113239

    Hi,

    I have managed to change the layout of the results.php file to match the theme layout. I am now trying to use the filter part of the plugin and you mentioned that I should be using the Custom Post Type UI to create my taxonomies. have tried to follow the post on this page: https://support.searchandfilter.com/forums/topic/multiple-categories-combination/#post-55166 but I am not too sure how to use the plugin create the taxamonies I need.

    Could you please show me an example of how this would work?

    Thanks.

    Trevor
    #113247

    Are you needing to create custom post types as well, or just to split categories into separate custom taxonomies?

    Anonymous
    #113269

    just trying to split categories into separate custom taxonomies to make the filter options easier.

    Thanks

    Trevor
    #113271

    I could probably show you quicker than write something? Do you have my Skype details?

    Anonymous
    #113294

    Yes. I will send you a message on there.

    Thanks

    Anonymous
    #113745
    This reply has been marked as private.
    Trevor
    #113765

    Hi Ihtezaz

    Great to speak with you. I hope that points you in the right direction. You may need to re-build the cache in the form after you are done.

    Anonymous
    #115227

    Hi Trevor,

    Thank you so much for your help. I have managed to get the search function working but I have now encountered another issue:

    My theme has some code which displays the month an event is in on the main listing page. When I use the search filter, this is no longer visible. Could you please help me solve this? I have found the code that produces the listing by date from my theme but when I tried to add it into the results.php file, the page did not work as expected. I think it may be easier to show you the issue, as opposed to explaining it.

    Also, the search results do not filter any upcoming events.

    Thanks,
    Ihtezaz

    Trevor
    #115254

    What is the code and how have you used it?

    Anonymous
    #115260

    Please see below for the code in my theme that i want to implement:

    <?php do_action( 'tribe_events_inside_before_loop' ); ?>
    
    <!-- Month / Year Headers -->
    <?php tribe_events_list_the_date_headers(); ?>
    
    <!-- Event  -->
    <div id="post-<?php the_ID() ?>" class="<?php tribe_events_event_classes() ?> <?php echo esc_attr( $class ); ?>">
    <?php tribe_get_template_part( 'list/single', 'event' ) ?>
    </div><!-- .hentry .vevent -->
    
    <?php do_action( 'tribe_events_inside_after_loop' ); ?>

    I have placed this in the results.php file like so:

    <?php
    if ( $query->have_posts() ) { ?>
    
    <?php while ($query->have_posts()) { $query->the_post(); ?>
    
    <?php do_action( 'tribe_events_inside_before_loop' ); ?>
    
    <!-- Month / Year Headers --> <?php /*<---THIS IS THE BIT I NEED WORKING */?>
    <?php tribe_events_list_the_date_headers(); ?>
    
    <!-- THIS BIT IS REPLACED WITH THE CODE ON THE RESULTS.PHP FILE TO OUTPUT THE SPECIFIC EVENTS-->
    <div id="post-<?php the_ID() ?>" class="<?php tribe_events_event_classes() ?> <?php echo esc_attr( $class ); ?>">
    <?php tribe_get_template_part( 'list/single', 'event' ) ?>
    </div><!-- .hentry .vevent -->
    
    <?php do_action( 'tribe_events_inside_after_loop' ); ?>

    end while and if statements.

Viewing 10 posts - 1 through 10 (of 16 total)