• This is a development site I am building for a client using the search and filter plugin but it does not work. I followed the instructions and have it installed correctly but when I go to search for the taxonomy term nothing is returned. It shows a blank page with the home pg url. Not sure what could be causing this.

    Here is the shortcode used:
    <?php echo do_shortcode( ‘[searchandfilter taxonomies=”listing_type” submit_label=”Search”]’ ); ?>

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • I have just installed the plugin, and it doesn’t show anything. I have used a default short code provided in the plugin documentation:

    [searchandfilter taxonomies="search,category,post_tag,post_format"]

    http://www.jamworld876.net/advanced-search/

    Did any of you have any luck finding out what the problem is? I’m having it as well 🙁

    Thread Starter antoniojcastiglione

    (@antoniojcastiglione)

    @tatianahenriquezg I did not have luck with the plugin so I decided to hand code a solution. Spent several hours doing some research on queries and custom search results using forms and got it working. Below is the code I used for my results.

    <form method="get" id="search-form" action="url-of-search-page-here">
       <div class="homepg-search">
    
        <?php  wp_dropdown_categories('taxonomy=listing_type&name=listing_type'); ?>
    
        <input type="submit" value="Search" id="submitSelection" />
    
       </div>
    </form>
    <?php
    $taxID = $_GET['listing_type']; // Grabbing the custom taxonomy term id
     $state = $_GET['state']; // If using state selection
     $paged = get_query_var('paged');
     if( $taxID ) :
     $args = array( // Building the arguments for the new query
     	'post_type' => 'listing',
     	'tax_query' => array(
     		array(
     			'taxonomy' => 'listing_type',
     			'field' => 'term_id',
     			'terms' => $taxID,
     		),
     	),
     	'posts_per_page' => 20,
      'paged' => $paged
     );
    
     $rQuery = new WP_Query( $args ); // Initializing the loop
     $count = $rQuery->found_posts; // Getting total number of results
    
    else :
      $args = array(
        'post_type' => 'listing',
        'posts_per_page' => 8,
        'paged' => $paged,
        'tax_query' => array(
          array(
            'taxonomy' => 'state',
            'field' => 'slug',
            'terms' => $state,
          ),
        ),
      );
    
      $sQuery = new WP_Query( $args ); // Initializing state query loop
      $count = $sQuery->found_posts; // Getting total number of results
    endif;
    ?>
    Uriahs Victor

    (@uriahs-victor)

    Same issue. I’m testing on WP default themes and no search box appears

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Search does not work’ is closed to new replies.