Support » Plugin: Relevanssi - A Better Search » Searching from category or custom post type leads to results only from that item

  • Hello!
    Have used Relevanassi on several sites and never seen this before. I am using several custom post types and categories and when, for example, I search the site for bible study (there is a bible study post in a “news” cpt) on the Staff Archive (staff is the cpt) nothing shows as it is only searching the staff cpt. Thoughts? Below is my search.php and searchform.php

    <?php if(have_posts()): while(have_posts()): the_post(); ?>
    						<div class="span4">
    							<div class="archive-box-item">
    								<?php if( has_post_thumbnail()) { ?>
    								<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('homepage_thumbnail'); ?></a>
    								<?php } ?>
    								<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><span class="text-white"><b><?php the_title(); ?></b></span></a><br />
    								<?php the_excerpt(); ?>
    						<?php endwhile; endif; ?>


    <form role="search" method="get" id="searchform" class="searchform" action="<?php home_url( '/' ) ?>" >
        <input type="search" placeholder="<?php __("Search")?>" value="<?php get_search_query() ?>" name="s" id="s" class="search-input" />
        <input type="submit" id="searchsubmit" value="Search" />

Viewing 1 replies (of 1 total)
  • Plugin Author Mikko Saari


    Nothing in these snippets that would restrict the search like that. I’d still do a

    global $wp_query; var_dump($wp_query->query_vars);

    on the search results page to see what’s in the query vars.

Viewing 1 replies (of 1 total)
  • The topic ‘Searching from category or custom post type leads to results only from that item’ is closed to new replies.