Forums › Forums › Search & Filter Pro › No search results with "As an Archive" display method
- This topic has 15 replies, 3 voices, and was last updated 8 years, 8 months ago by Anonymous.
-
Anonymous(Private) March 14, 2016 at 6:22 pm #39405
HI,
We purchased this plugin and configure it to show the results as an archive (with the archive.php file) but not working well, this is the search form url:
http://www.valladolidesquelas.com/buscador-esquelas/
And as you see if you select any option on the form always show “all the possible” results
(at the first select dropdown you can see the number of the items in each category to test it)What could be the problem and the solution?????
Thanks.
Ross Moderator(Private) March 16, 2016 at 2:53 pm #39535What template are you using for your results?
Can you supply the code and I’ll take a look?
Thanks
Anonymous(Private) March 16, 2016 at 6:13 pm #39572The file template is “archive.php”
and this is the code on it:
<?php
/**
* Archive pages.
*
* @package vogue
* @since 1.0.0
*/// File Security Check
if ( ! defined( ‘ABSPATH’ ) ) { exit; }$config = presscore_get_config();
$config->set( ‘template’, ‘archive’ );
$config->set( ‘layout’, ‘masonry’ );
$config->set( ‘template.layout.type’, ‘masonry’ );get_header(); ?>
<!– Content –>
<div id=”content” class=”content” role=”main”><?php
if ( have_posts() ) :do_action( ‘presscore_before_loop’ );
// backup config
$config_backup = $config->get();// masonry container open
echo ‘<div ‘ . presscore_masonry_container_class( array( ‘wf-container’ ) ) . presscore_masonry_container_data_atts() . ‘>’;while ( have_posts() ) : the_post();
presscore_archive_post_content();
$config->reset( $config_backup );endwhile;
// masonry container close
echo ‘</div>’;dt_paginator();
do_action( ‘presscore_after_loop’ );
else :
get_template_part( ‘no-results’, ‘search’ );
endif;
?></div><!– #content –>
<?php do_action(‘presscore_after_content’); ?>
<?php get_footer(); ?>
Ross Moderator(Private) March 16, 2016 at 11:00 pm #39608Hey Raul
Before the
have_posts()
can you add:do_action('search_filter_query_posts', 96);
replace96
with your search form IDTaken from:
https://www.designsandcode.com/documentation/search-filter-pro/action-filter-reference/#Query_PostsIF that does not work, I believe the line:
do_action( ‘presscore_before_loop’ );
may be causing an issue.Try removing it, or, adding
do_action('search_filter_query_posts', 96);
directly after it (do not use this code twice in the same template).Thanks
Ross Moderator(Private) March 18, 2016 at 5:10 pm #39816Hey Raul
Can you supply your new updated template code via something like pastebin? (so I can see it nicely formatted)
Also can you share your exact settings from the “display results” tab?
Thanks
Anonymous(Private) March 20, 2016 at 1:29 pm #39906Hi,
Here is the code of the archive that i use to display results (results.php):
and here i put a screenshot of the display results tab config:
http://www.valladolidesquelas.com/wp-content/uploads/2016/03/display_options.png
Thanks.
Trevor(Private) March 21, 2016 at 11:34 am #39982Hi Raul
I am going to take up the support for this topic as it appears related to an earlier thread that you posted. Am I right in thinking that you have progressed to this point now and need help with this only and the other topic needs closing? I can see a number of tickets from you and I think some 1 on 1 time might tick them all off in one go? I can send you my email address, or you can send me a private reply with Skype details, so we can use share screens?
Trevor(Private) March 22, 2016 at 8:28 am #40104Hi Raul
I made your last post private as it had personal details in. Hopefully, Ross will be getting back to you, as this issue is too complex for me to resolve, lying buried with the code of the theme that you are using, which does not appear to be following (good) WordPress coding standards (not unusual for themes on Themeforest, where submitted themes are not checked by WordPress before being approved).
It may be that it is something we are unable to resolve, but I hope we are able to to resolve it.
As an aside, and for future consideration (and NOT as a suggestion to fix this issue), I personally do not like the type of theme that promises such flexibility in this way. I prefer theme frameworks, and I have to admit I am biassed towards Ultimatum, not least because it has specific support for compatibility for Search and Filter Pro (it is not connected in any way to Design and Code). At this point in time I can provide anyone who wants a discount link for the Pro version of Ultimatum for 60% off the normal $125 price, making it just under $52 (plus tax if you are in the EU).
-
AuthorPosts