Forums › Forums › Search & Filter Pro › searching by text in custom posts is not working
- This topic has 13 replies, 2 voices, and was last updated 5 years, 8 months ago by Anonymous.
-
Anonymous(Private) March 8, 2019 at 4:53 pm #204423
https://www.cityofpasadena.net/human-services/parks
when you search by name of the park, say Robinson, the search produces no results. I have rebuilt the index several times. Also I have enable relevanssi and rebuilt relevanssi index as well selecting the custom posts park to be indexed. still no results. any suggestions?
Anonymous(Private) March 8, 2019 at 5:23 pm #204436Here’s the search.php template. Still not sure what you mean. This functionality used to work. and then stopped. Shall we display results as a post-archive instead?
<?php /** * The template for displaying search results pages. Uses built-in WordPress search or Relevanssi search, * with Google Custom Search Form at the bottom as an alternative * * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result * * @package copblue */ get_header(); ?> <div class="container"> <div class="row"> <section id="primary" class="fullwidth-content-area"> <main id="main" class="site-main" role="main"> <header class="entry-header text-center"> <?php echo '<h1 class="entry-title">Search Results</h1>'; ?> </header><!-- .entry-header --> <?php if ( have_posts() ) : ?> <div class="search-form mb-3"><?php get_search_form(); ?></div> <h5 class="page-title"><?php printf( esc_html__( 'Found %u results for: %s', 'copblue' ), $wp_query->found_posts, '<span><i>' . get_search_query() . '</i></span>' ); ?></h5> <hr> <?php /* Start the Loop */ while ( have_posts() ) : the_post(); /* The code below is necessary for Relevanssi Multisite search. Remove if not using Relevanssi as a search engine or if not using it in multisite mode */ switch_to_blog($post->blog_id); /** * Run the loop for the search to output the results. * If you want to overload this in a child theme then include a file * called content-search.php and that will be used instead. */ get_template_part( 'template-parts/content', 'search' ); /* This code is necessary for Relevanssi Multisite search. Remove if not using Relevanssi as a search engine or if not using it in multisite mode */ restore_current_blog(); endwhile; ?> <div class="mb-3"> <?php the_posts_pagination( array( 'mid_size' => 5, 'prev_text' => __( 'Previous', 'textdomain' ), 'next_text' => __( 'Next', 'textdomain' ), ) ); ?> </div> <?php else : get_template_part( 'template-parts/content', 'none' ); endif; ?> <div class="google-cse-form mb-3"> <hr> <h5> If you still can't find what you are looking for, try our Google On-Site Search below</h5> <?php //echo do_shortcode( '[wp_google_searchbox]' ); ?> <?php get_template_part( 'template-parts/content', 'gcse-form' );?> </div> </main><!-- #main --> </section><!-- #primary --> <?php get_footer();
-
AuthorPosts