Forums › Forums › Search & Filter Pro › Some issues
Tagged: pagination
- This topic has 12 replies, 2 voices, and was last updated 7 years, 11 months ago by Trevor.
-
Anonymous(Private) January 6, 2017 at 10:22 pm #80609
Hi, just spent my day configuring the plugin and it’s awesome how great it went! Documentation is well done but still I have some issues I can’t resolve myself and need your help.
1- How can I add pagination to my search results knowing I almost have no knowledge of code?
2- No matter what I do I can’t hide the widget on other pages than the search page. Ie it appears on the forum and shouldn’t (http://antan.tv/forums)
3- Once Ajax refresh the results after I choose a filter I loose most of the post pictures thumbnails. I’ve noticed that if I refresh the page manually all the thumbnails come back.
Site URL: http://www.antan.tv/series
Thanks for the plugin and thanks for helping me out.
Trevor(Private) January 9, 2017 at 10:35 am #80799Hi
You are currently using
As an Archive
display method, and this means that Search & Filter uses your theme templates to display the results. In your case, this is set (at the default)search.php
, which is the default WordPress name for a search results template. However, you are using the Cherry Framework and I cannot see what template files it has, or how it makes templates.I can see see, when editing the
series
page, that there is an options meta box to setAttributs de la page
, whereModele
is set to Filter Folio 4 cols.But I cannot see how you define or edit that layout/template. For it is there that the problem is arising, and where pagination must be set.
Anonymous(Private) January 9, 2017 at 4:47 pm #80897Hi Trevor,
Actually I don’t like the “Filter Folio 4 cols” page. It’s a 4 column page and there’s no way to add a sidebar so I can’t have plugin to show correctly on this page.
I actually like the search.php page layout which is exactly what I want as a good starting point for my site. I guess there’s a possibility to add pagination to this page as if you make a search with the top right search bar of the website the pagination works.
For example here’s a big search with multiple pages you can see the pagination.
http://antan.tv/?s=animationAs for the Cherry Framework in the theme files all the search templates are there but like I said I’m not good in code and can’t really mess with these unfortunately. I’ll give you FTP credentials.
Thanks.
Trevor(Private) January 10, 2017 at 11:22 am #81075Hi
Your site seems to be down at the moment? Before you get back to me, can you take a look at this FAQ Page, and find the section titled:
What can I do to make my theme use The Loop?
I know it is talking about Avada, but most of it might apply. In particular, make sure 1 and 2 are done. As you are using a child theme, put the new template you make in the child theme folder, and not in the main Cherry folder.
Anonymous(Private) January 10, 2017 at 6:53 pm #81186Hi Trevor,
I’ve search the
WP_Query, get_posts or query_posts
terms and I’m not quite sure.I’ve opened “search.php” and it seems that it contains nothing than just pointing to other php page. There’s a line in the content div that talks about the loop.
<div class="<?php echo cherry_get_layout_class( 'content' ); ?> <?php echo of_get_option('blog_sidebar_pos'); ?>" id="content" data-motopress-type="loop" data-motopress-loop-file="loop/loop-blog.php"> <?php get_template_part("loop/loop-blog"); ?> </div>
So from there it seems to me that I need to look at the file in “loop/loop-blog.php”
<?php /* Loop Name: Blog */ ?> <!-- displays the tag's description from the WordPress admin --> <?php if (is_tag()) echo tag_description(); if (have_posts()) : while (have_posts()) : the_post(); // The following determines what the post format is and shows the correct file accordingly echo '<div class="post_wrapper">'; $format = get_post_format(); get_template_part( 'includes/post-formats/'.$format ); if ($format == '') get_template_part( 'includes/post-formats/standard' ); echo '</div>'; endwhile; else: ?> <div class="no-results"> <?php echo '<p><strong>' .theme_locals("there_has"). '</strong></p>'; ?> <p><?php echo theme_locals("we_apologize"); ?> <a href="<?php echo home_url(); ?>/" title="<?php bloginfo('description'); ?>"><?php echo theme_locals("return_to"); ?></a> <?php echo theme_locals("search_form"); ?></p> <?php get_search_form(); /* outputs the default WordPress search form */ ?> </div><!--no-results--> <?php endif; if ( !is_home() ) { get_template_part('includes/post-formats/post-nav'); } ?>
From here I’m not quite sure what to remove to get my theme use the loop.
PS: I’ve copied the “search.php” page in my child theme as “search-filter.php” and also “loop/loop-blog.php” in my child theme as “loop/loop-filter.php”. I also changed in search.php the lines “loop-blog” for “loop-filter”.
I would appreciate your help to point me out where to go.
Thanks a lot for your help.
Trevor(Private) January 11, 2017 at 9:36 am #81295Hi
See this part?
if (have_posts()) : while (have_posts()) : the_post();
We can use this:
https://www.designsandcode.com/documentation/search-filter-pro/action-filter-reference/#Query_Posts
For example:
do_action('search_filter_query_posts', 96);
And put this in the line immediately preceding the
if (have_posts())
line, where you change 96 for the ID number of the form (as shown in the shortcode).Anonymous(Private) January 11, 2017 at 4:07 pm #81391Hi Trevor, I’ve tried many ways of writing it in the “/theme51822/loop/loop-filter.php” file and whatever I change in that file it removes any content.
I’m afraid that my knowledge ends here. I’ve never really understood PHP and got result by trial and error which unfortunately didn’t work this time.
I would really appreciate if you could go in my FTP provided some post earlier and edit the file accordingly.
*Also I had 2 other issues, I guess we’ll check them after this one is resolved.
Many thanks to you.
-
AuthorPosts