Support Forums

Support Forums Forums Search & Filter Pro Search results don't display

This topic is: resolved

This topic contains 14 replies, has 2 voices, and was last updated by  Andrea Facheris 2 months, 1 week ago.

Viewing 10 posts - 1 through 10 (of 15 total)
  • Andrea Facheris
    #201946

    Hi,
    I’ve recently purchased your plugin, I set it up using a custom template, I can see the ajax requests return results but they don’t populate the target div inside my page.

    This is my header.php with the search bar:

        <?php echo do_shortcode('[searchandfilter id="506594"]'); ?>
        <div class="container" id="cs-main">
            
            <div class="container_inner default_template_holder clearfix">
    
                <div class="pt-cv-wrapper">
                        <div id="cs-aj"></div>
                        <div class="pagination"><?php wp_pagenavi(); ?></div>
                </div>
        
            </div>
    
        </div>

    And this is my custom-search.php

    <?php if(have_posts()) : while ( have_posts() ) : the_post(); ?>
       <article id="post-<?php the_ID(); ?>" class="col-xs-12" >
    	<div class="post_content_holder row">
    		<?php if ( has_post_thumbnail() ) { ?>
    			<div class="post_image col-sm-1 col-xs-12 col-sm-offset-1">
    				<a itemprop="url" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
    					<?php the_post_thumbnail('thumbnail'); ?>
    				</a>
    			</div>
    			<div class="qode-post-text-inner col-sm-9 col-xs-12">
    				 <div class="qode-post-info-top">
    					<div class="qode-post-info-category">				
    					<?php
    					$posttags = get_the_tags();
    					if ($posttags) {
    					  foreach($posttags as $tag) {
    						echo '<a href="/tag/' .$tag->slug.'" class="tag-clr"><span class="'.$tag->slug.'">' . $tag->name . '</span></a>'; 
    					  }
    					}
    					?>
    					</div>
    				 </div>
    				<div class="post_text_inner">
    					<h4 itemprop="name" class="entry-title qode-post-title"> <a itemprop="url" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>
    					<div class="post_info">
    					<span class="post_author">
    						<a itemprop="author" class="post_author_link" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_meta('display_name'); ?></a>
                                 - </span> 
    						<span itemprop="dateCreated" class="date entry_date updated"><?php the_time('M d,Y'); ?><meta itemprop="interactionCount" content="UserComments: <?php echo get_comments_number(qode_get_page_id()); ?>"/></span>
    					</div>	
    				</div>
    
    			</div>		
    		<?php } ?>
    
    	</div>
    </article>
    <?php endwhile; ?>
    <?php else: //If no posts are present ?>
        <div class="entry">
            <p><?php _e('No posts were found.', 'qode'); ?></p>
        </div>
    <?php endif; ?> 
    
    

    Any clue on how to get it to work?

    thanks!
    Andrea

    Trevor Moderator
    #201955
    This reply has been marked as private.
    Andrea Facheris
    #202006
    This reply has been marked as private.
    Trevor Moderator
    #202048
    This reply has been marked as private.
    Andrea Facheris
    #202050
    This reply has been marked as private.
    Trevor Moderator
    #202054
    This reply has been marked as private.
    Andrea Facheris
    #202056
    This reply has been marked as private.
    Trevor Moderator
    #202058

    I don’t know. You need to look at the theme’s other templates to see how they are structured. All it is outputting right now is the articles tags and content.

    Andrea Facheris
    #202060

    Yeah I know but in the ajax request I see the articles correctly as you saw switching off ajax options. I don’t need a full page, I just need those results injected into the ajax container after the request, is it possible?

    Andrea Facheris
    #202062

    I’ll show you another thing, if I put my search result template directly where the shortcode is (in my header.php) search works like I want (switching off the “using custom template option”, take a look. But with this setup pagination will not display

Viewing 10 posts - 1 through 10 (of 15 total)

The topic ‘Search results don't display’ is closed to new replies.