Forums › Forums › Search & Filter Pro › Contents loads then loads again
- This topic has 4 replies, 2 voices, and was last updated 5 years, 8 months ago by Trevor.
Viewing 5 posts - 1 through 5 (of 5 total)
-
Anonymous(Private) March 12, 2019 at 11:12 am #204855
Hello I have come across a issue where all my filter content loads in correctly. However if you click elsewhere or visit another window then return it loads in again.
What would be causing this. Here is my template code
get_header(); ?> <div class="page-body style-light-bg"> <div class="post-wrapper"> <div class="row row-parent col-std-gutter double-top-padding no-bottom-padding limit-width"> <div class="col-lg-8"> <div class="post-content style-light double-bottom-padding"> <tbody> <table> <td> <p>File</p> </td> <td> <p>Name</p> </td> <td> <p>Language</p> </td> <td> <p>Publish Date</p> </td> <td> <p>Download</p> </td> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <tr> <td> <img src="<?php the_field('file_icon'); ?>" /> </td> <td class="ptitle"> <a href="<?php the_permalink(); ?>"><?php echo get_the_title(); ?></a> </td> <td> <img src="<?php the_field('language'); ?>" /> </td> <td> <?php the_field('publish_date'); ?> </td> <td> <a href="<?php the_field('download'); ?>" target="_blank">Download</a> </td> <?php endwhile; else : ?> <?php endif; ?> </tr> </table> </tbody> </div> </div> <div class="col-lg-4"> <div class="uncol style-light"> <div class="uncoltable"> <?php get_sidebar(); ?> </div> </div> </div> </div> </div> </div> <?php get_footer(); ?>
Anonymous(Private) March 12, 2019 at 11:15 am #204856Here is the URL https://extensions.brookstonesites.co.uk/downloads
Trevor(Private) March 12, 2019 at 3:51 pm #204888Ah, I think I can see. It is the structure of the template, and a few errors in the HTML. Try something like this:
<?php get_header(); ?> <div class="page-body style-light-bg"> <div class="post-wrapper"> <div class="row row-parent col-std-gutter double-top-padding no-bottom-padding limit-width"> <div class="col-lg-8"> <div class="post-content style-light double-bottom-padding"> <?php if ( have_posts() ) : ?> <tbody class='search-filter-results-list'> <table> <tr> <td> <p>File</p> </td> <td> <p>Name</p> </td> <td> <p>Language</p> </td> <td> <p>Publish Date</p> </td> <td> <p>Download</p> </td> <?php while ( have_posts() ) : the_post(); ?> </tr> <tr class='search-filter-result-item'> <td> <img src="<?php the_field('file_icon'); ?>" /> </td> <td class="ptitle"> <a href="<?php the_permalink(); ?>"><?php echo get_the_title(); ?></a> </td> <td> <img src="<?php the_field('language'); ?>" /> </td> <td> <?php the_field('publish_date'); ?> </td> <td> <a href="<?php the_field('download'); ?>" target="_blank">Download</a> </td> <?php endwhile; else : ?> </tr> </table> </tbody> <?php endif; ?> </div> </div> <div class="col-lg-4"> <div class="uncol style-light"> <div class="uncoltable"> <?php get_sidebar(); ?> </div> </div> </div> </div> </div> </div> <?php get_footer(); ?>
Then, I have edited the form for you:
Anonymous(Private) March 12, 2019 at 4:20 pm #204904Hello, Your code messed up the layout of the page so I re-aranged this section which seemed to solve that:
</tr> <?php endwhile; else : ?> <?php endif; ?> </tbody> </table>
The other aterations and the changes you made under Ajax pagination fixed the issue I was having thankyou
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)