Forums › Forums › Search & Filter Pro › Pagination
- This topic has 16 replies, 2 voices, and was last updated 9 years, 6 months ago by Ross.
-
Anonymous(Private) April 14, 2015 at 9:16 am #15040
Hi!
Awesome plugin!
After having built and included the first search form, the pagination doesn’t work any more. The URL changes, but the page doesn’t open.
You may try it on http://hofer-filmtage.com/testarchiv-b/
The similar page with the working pagination is http://hofer-filmtage.com/dokumentarfilme-2014/
Do you have any idea?
Best regards
BerndRoss Moderator(Private) April 15, 2015 at 10:53 pm #15150Hi there
I think I may have an idea – do you have ajax enabled in S&F admin area?
What is happening is S&F is trying to load the next page with ajax, but the “results container” in the admin (in S&F settings box) is not valid, so you don’t see any results update.
Disable Ajax and I think it will work, if you want ot use ajax, you must set results container correctly.
Thanks
Anonymous(Private) April 16, 2015 at 11:08 am #15210Hi Ross!
Great idea – it works. But I can’t really understand this correlation, because it’s concerning the pagination of the portfolio-grid of my theme.
A question for my better understanding and a few words about the project:
I have to built a festival archive (1967-2014) with 3.600 portfolio-items. The page should display a few search-options and a paginated portfolio-grid. The layout should follow the theme, but in principle it should work similar to your movie-review demo.
So what can I see, if I open your demo without searching anything:
Your theme-built portfolio-grid or your customized results-template?
Thanks Ross, and best regards
BerndRoss Moderator(Private) April 16, 2015 at 11:37 am #15216Hey Bernd
The thing is, when you turn on Ajax, S&F will look at results container, or the “pagination selector” and try to apply some JS code to them.
What it does is, it takes the results container, and it loads teh results in there.
Then with the pagination selector, it will modify any links found to become S&F pagination links – which load content via ajax…
This happens on every page there is a S&F form – which now looking at your case, could be improved slightly.
As you site is (was) not using ajax properly, I would either disable it, or empty/change the field for “pagination selector” – so it doesn’t change the behaviour of your existing pagination
If you are comfortable with modifying the display of the results (html/css/js), I would recommend to display results using a shortcode and not “as archive”..
Check the docs on the different methods and instructions on how to setup:
http://www.designsandcode.com/wordpress-plugins/search-filter-pro/docs/display-results/
Thanks
Anonymous(Private) April 16, 2015 at 12:28 pm #15218Hi Ross!
OK thanks, I’ll work for it and try to get that …
What do you think about my last question: “So what can I see, if I open your demo without searching anything: Your theme-built portfolio-grid or your customized results-template?”
Thanks, BerndRoss Moderator(Private) April 16, 2015 at 1:01 pm #15219Sorry Bernd – I didn’t quite understand that, its probably the wording of it, can you explain a little more?
Thanks
Anonymous(Private) April 16, 2015 at 2:46 pm #15225Hi Ross!
OK, sorry.
If I open your demo-page, I see 10 movie-items in the container with the id=”content”.
Did you add these articles about the movies with the page-builder of your theme as normal page-content?
Or is this already the customized S&F “results container” containing all movies?
Thanks, BerndAnonymous(Private) April 17, 2015 at 8:24 am #15290Hi Ross!
Please forget the last two questions – I’ve got it.
Now the search-form displays the results using a shortcode. But I’ve got a problem with the custom template, that I built on the base of your ‘results.php’. As you can see, it’s not loading the portfolio items, but something with the name of the results-page: http://hofer-filmtage.com/testarchiv-b/
Do you have an idea?
Thanks, BerndAnonymous(Private) April 17, 2015 at 11:10 am #15310Hi Ross!
An addition: If I set the search-form to ‘Display results as an archive page’ and use the template with the following code, I get the right results.
Best regards, Bernd<?php global $avia_config; /* * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory. */ get_header(); echo avia_title(array('title' => avia_which_archive())); ?> <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'> <div class='container'> <main class='template-page template-portfolio content <?php avia_layout_class( 'content' ); ?> units' <?php avia_markup_helper(array('context' => 'content','post_type'=>'portfolio'));?>> <div class="entry-content-wrapper clearfix"> <div class="category-term-description"> <?php echo term_description(); ?> </div> <?php $grid = new avia_post_grid(array( 'linking' => 'ajax', 'columns' => '3', 'contents' => 'excerpt', 'sort' => 'no', 'paginate' => 'yes', 'set_breadcrumb' => false, )); $grid->use_global_query(); echo $grid->html(); ?> </div> <!--end content--> </main> <?php //get the sidebar $avia_config['currently_viewing'] = 'portfolio'; get_sidebar(); ?> </div><!--end container--> </div><!-- close default .container_wrap element --> <?php get_footer(); ?>
Ross Moderator(Private) April 18, 2015 at 9:17 am #15342Hey Bernd, so everything is is working now? 🙂
-
AuthorPosts