Looking for support? You can access the support system via your account.
Forums › Forums › Search & Filter Pro › Search results don't display
- This topic has 14 replies, 2 voices, and was last updated 5 years, 2 months ago by Andrea Facheris.
-
Andrea Facheris(Private) February 12, 2019 at 11:47 am #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!
AndreaTrevor Moderator(Private) February 12, 2019 at 12:17 pm #201955This reply has been marked as private.Andrea Facheris(Private) February 12, 2019 at 2:10 pm #202006This reply has been marked as private.Trevor Moderator(Private) February 12, 2019 at 4:00 pm #202048This reply has been marked as private.Andrea Facheris(Private) February 12, 2019 at 4:01 pm #202050This reply has been marked as private.Trevor Moderator(Private) February 12, 2019 at 4:32 pm #202054This reply has been marked as private.Andrea Facheris(Private) February 12, 2019 at 4:33 pm #202056This reply has been marked as private.Trevor Moderator(Private) February 12, 2019 at 4:36 pm #202058I 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(Private) February 12, 2019 at 4:38 pm #202060Yeah 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(Private) February 12, 2019 at 4:41 pm #202062I’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
-
AuthorPosts
The topic ‘Search results don't display’ is closed to new replies.