Hey Stian
The only time pagination won’t show is if you don’t have more results – could you add this to your template file so we can see how many results the plugin has:
<?php
global $wp_query;
echo "Results found: ".$wp_query->post_count."<br />";
?>
If the post count is below results per page then you will not see pagination.
In regards to masonry – take a look at the first question in our FAQs – http://www.designsandcode.com/wordpress-plugins/search-filter-pro/faqs/
Thanks
AnonymousInactive
So I already made one template that works great with a custom-post-type archive, pagination displays and works great with AJAX.
This other page I’m doing is for news items, but the pagination won’t display at all.
The settings and files are almost identical, with the exception of the markup of the listings.

Working page
This page is not working
I’m not sure what’s wrong here.
Another issue I’m having with this page is that the masonry script won’t work after I use any filters to change the results.
Hey Robbin
Thanks for this – you got further than most – this used to be a suggestion I provided but to make life easier I created two custom events which you can hook in to like:
$(".searchandfilter").on("sf:ajaxstart",function(){
console.log("ajax start");
});
$(".searchandfilter").on("sf:ajaxfinish",function(){
console.log("ajax complete");
//so load your lightbox or JS scripts here again
});
Thanks 🙂
AnonymousInactive
Got it. In case this is helpful to others, you can trigger scripting functions after the ajax filter by wrapping them in this function:
jQuery(window).ajaxComplete(function($){ $('.target').action(); });
AnonymousInactive
I’ve got jQuery Masonry working when the page first loads, but it does not get applied after each ajax request. Is there an event handler that I can trigger this with? Thanks!
AnonymousInactive
Sorry, also here is the theme template code:
<?php
// =============================================================================
// VIEWS/GLOBAL/_INDEX.PHP
// -----------------------------------------------------------------------------
// Includes the index output.
// =============================================================================
$stack = x_get_stack();
if ( is_home() ) :
$style = x_get_option( 'x_blog_style', 'standard' );
$cols = x_get_option( 'x_blog_masonry_columns', '2' );
$condition = is_home() && $style == 'masonry';
elseif ( is_archive() || is_search() ) :
$style = x_get_option( 'x_archive_style', 'standard' );
$cols = x_get_option( 'x_archive_masonry_columns', '2' );
$condition = ( is_archive() || is_search() ) && $style == 'masonry';
#elseif ( is_search() ) :
# $condition = false;
endif;
?>
<?php if ( $condition ) : ?>
<?php x_get_view( 'global', '_script', 'isotope-index' ); ?>
<div id="x-iso-container" class="x-iso-container x-iso-container-posts cols-<?php echo $cols; ?>">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php if ( $stack != 'ethos' ) : ?>
<?php x_get_view( $stack, 'content', get_post_format() ); ?>
<?php else : ?>
<?php x_ethos_entry_cover( 'main-content' ); ?>
<?php endif; ?>
<?php endwhile; ?>
<?php else : ?>
<?php x_get_view( 'global', '_content-none' ); ?>
<?php endif; ?>
</div>
<?php else : ?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php x_get_view( $stack, 'content', get_post_format() ); ?>
<?php endwhile; ?>
<?php else : ?>
<?php x_get_view( 'global', '_content-none' ); ?>
<?php endif; ?>
<?php endif; ?>
<?php pagenavi(); ?>
AnonymousInactive
Hi, I need to process manipulate the search results to applied a “masonry” layout to them. How can I hook that up?
AnonymousInactive
Hi,
I don’t understand how the new Ajax instructions work with the styling of the search display.
If I choose “Load results using Ajax” and “Use a shortcode to display results” the option for Page template disappears. [http://imgur.com/RPYAhp2]
I am using this theme (https://wordpress.org/themes/baskerville). The search results, as well as the posts are displayed in a grid form (masonry layout). This is how I want to display the search results from using the Search and Filter plugin as well.
I understood that I would be able to do this by making the custom template search.php from my theme, but this is not working, even if I have the Ajax option disabled.
I just want the results to appear in the same way search results appear on my theme.
Please help.
Thanks.
Hey Pamella
Thanks, always nice to hear positive feedback 🙂
RE your issues… basically customising the results page is as you mention to do with template development which is slightly out of the ‘realm’ of support for this plugin but I can point you in the right direction.
Basically, the results template works the same as a post archive page, which means that is uses the main loop to display your posts – therfore some of those plugin for sure won’t be compatible, because they run their own queries to get results so bear this in mind when going forward.
RE the post content displaying, take a look at the WordPress documentation about the loop – you can use all the functions/template tags from here (http://codex.wordpress.org/The_Loop) so to display an excerpt rather than the full content replace the_content() with the_excerpt() – just check the docs.
To display results in a grid like fashion I think these tutorials will help:
http://www.wpbeginner.com/wp-themes/how-to-create-a-grid-display-of-post-thumbnails-in-wordpress-themes/
http://www.transformationpowertools.com/wordpress/posts-in-columns-a-new-twist-on-an-old-problem or http://www.transformationpowertools.com/wordpress/playing-with-columns-stacking-posts-grid-style
What I’m sure would be even better would be using a masonry style layout, but this is more difficult and requires more work, so depends on how comfortable you are coding – there are plenty of tutorials out there if you just google “display posts as masonry” – and look for tutorial not plugins which will often not use the main loop.
Thanks
Hey Piotr this is because your page height is dynamically being set by your scripts – not sure which one to be honest but probably something to do with masonry.
You need to make sure that masonry refreshes and does its recalculation once the new page content has loaded – you can detect when the AJAX has finished loading in jquery here:
http://api.jquery.com/ajaxcomplete/
Then once you detect Ajax complete, you should tell masonry to refresh (I’m not sure how to do that with your specific setup)
Thanks