Forums › Forums › Search & Filter Pro › Theme Conflict
Tagged: innovado results.php grid
- This topic has 26 replies, 2 voices, and was last updated 8 years ago by Trevor.
-
Trevor(Private) November 4, 2016 at 9:28 pm #68786
I have made one edit to the code in https://support.searchandfilter.com/forums/topic/theme-conflict/page/2/#post-68679 so copy and paste again. Sorry.
Trevor(Private) November 11, 2016 at 9:20 am #69792Well, it has at long last re-built the cache, but it is still not seeing all the posts because it is not seeing all the taxonomy terms.
What else? Well, I can see that WordPress is working with only 40M of memory. If you edit the wp-config.php file and put at the top after php is opened:
define('WP_MEMORY_LIMIT', '128M');
Be careful which text editor you use, as some on the Mac convert quotes to smart quotes. A really simple editor is needed, or a proper code editor, like brackets.io
The other thing I notice is that the PHP max_input_vars variable is set to the default of 1000. I usually have mine set to at least 5000. But I have a suspicion that neither is the cause.
You do have a server with very old versions of PHP etc on.
Did you bulk import these media?
I also note that WordPress needs updating.
Trevor(Private) November 11, 2016 at 7:57 pm #69874I can put them back quite easily, but I removed the Countries main category that they were inside. For those countries that DO show, are the counts correct or also wrong? I suspect that the WordPress count is messed up, which can be fixed, but you must take a full database backup first, as it requires running queries directly on the database.
BTW, be wary of bulk importing posts and media, as some plugins do not do a complete job and can cause this type of thing to happen, which is why I asked.
Trevor(Private) November 11, 2016 at 8:04 pm #69900For others who would want to see the code used, this is the final code:
<?php /** * Search & Filter Pro * * Sample Results Template * * @package Search_Filter * @author Ross Morsali * @link http://www.designsandcode.com/ * @copyright 2015 Designs & Code * * Note: these templates are not full page templates, rather * just an encaspulation of the your results loop which should * be inserted in to other pages by using a shortcode - think * of it as a template part * * This template is an absolute base example showing you what * you can do, for more customisation see the WordPress docs * and using template tags - * * http://codex.wordpress.org/Template_Tags * */ if ( $query->have_posts() ) { ?> <div class="sixteen columns">Found <?php echo $query->found_posts; ?> Results<br /> Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br /> <div class="pagination"> <div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div> <div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div> <?php /* example code for using the wp_pagenavi plugin */ if (function_exists('wp_pagenavi')) { echo "<br />"; wp_pagenavi( array( 'query' => $query ) ); } ?> </div></div> <?php $column_count = 0; $last_class = ""; while ($query->have_posts()) { $query->the_post(); $gallery_link_url = get_post_meta( attachment_url_to_postid(wp_get_attachment_image_url( get_the_ID(), "full", false )), $key = '_gallery_link_url', $single = true); if ($gallery_link_url == "") $gallery_link_url = "#"; if ($column_count == 0) echo '<div class="sixteen columns">'; ?> <div class="one_fourth<?php echo $last_class;?>"> <h2><a href="<?php echo $gallery_link_url; ?>" target="_blank"><?php the_title(); ?></a></h2> <a href="<?php echo $gallery_link_url; ?>" target="_blank"> <?php echo '<span class="responsive">'; echo wp_get_attachment_image( get_the_ID(), "thumb", "", "" ); echo '</span>'; ?> </a> </div> <?php $column_count ++; if ($column_count == 4) { $column_count = 0; echo '</div>'; $last_class = ""; } if ($column_count == 3) { $last_class = " last"; } } if ($column_count > 0) echo '</div>'; ?> <div class="sixteen columns">Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br /> <div class="pagination"> <div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div> <div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div> <?php /* example code for using the wp_pagenavi plugin */ if (function_exists('wp_pagenavi')) { echo "<br />"; wp_pagenavi( array( 'query' => $query ) ); } ?> </div></div> <?php } else { echo "No Results Found"; } ?>
-
AuthorPosts