WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
Searching from category or custom post type leads to results only from that item (2 posts)

  1. mrpritchett
    Member
    Posted 8 months ago #

    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(); ?>
    							</div>
    						</div>
    						<?php endwhile; endif; ?>

    Searchform.php:

    <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" />
    </form>

    http://wordpress.org/plugins/relevanssi/

  2. Mikko Saari
    Member
    Plugin Author

    Posted 8 months ago #

    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.

Reply

You must log in to post.

About this Plugin

About this Topic