searching by text in custom posts is not working

Forums › Forums › Search & Filter Pro › searching by text in custom posts is not working

Viewing 10 posts – 1 through 10 (of 14 total)
  • Anonymous
    #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?

    Trevor
    #204432
    This reply has been marked as private.
    Anonymous
    #204436

    Here’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();
    
    Trevor
    #204438
    This reply has been marked as private.
    Anonymous
    #204440

    and here’s our configuration, we have a custom post archive that we use to display results

    http://tinypic.com/r/640474/9

    Trevor
    #204444
    This reply has been marked as private.
    Anonymous
    #204446
    This reply has been marked as private.
    Trevor
    #204454
    This reply has been marked as private.
    Anonymous
    #204456

    Relevanssi Premium (paid version). going to try to turn off relevanssi now.

    Anonymous
    #204458

    It’s working if when I turn off relevanssi, but only if I search by title, which means I can’t search by custom fields (which contain information about each park)

Viewing 10 posts – 1 through 10 (of 14 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.