Forums › Forums › Search & Filter Pro › Using CPT for search filter
Tagged: cpt
- This topic has 15 replies, 2 voices, and was last updated 7 years, 6 months ago by Trevor.
-
Anonymous(Private) June 5, 2017 at 12:38 pm #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.
Anonymous(Private) June 15, 2017 at 4:05 pm #115227Hi 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,
IhtezazAnonymous(Private) June 15, 2017 at 4:54 pm #115260Please 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.
-
AuthorPosts