-
AuthorSearch Results
-
November 24, 2015 at 5:35 pm #30635
In reply to: Date not always showing
AnonymousInactiveHey Ross,
Did you try it on the results.php located in the avada theme folder /search-filter ?
I tried this again with the following two codes;
<?php
//Get an array of objects containing data for the current search/filter
//replace1526with the ID of your search form
global $searchandfilter;
$sf_current_query = $searchandfilter->get(14458)->current_query();
var_dump($sf_current_query->get_array());
?>and
<?php
//Get a single fields values using labels
//replace1526with the ID of your search form
global $searchandfilter;
$sf_current_query = $searchandfilter->get(14458)->current_query();
echo $sf_current_query->get_field_string(“_sft_category”);?>
Neither are able to pull the values I need.
I’d like to turn the Categories In: line to not be bulleted and be on the same line. If I can pull the category then it would be fine.
I tried the above codes at the top of the results.php and neither worked.
Any idea why ?
November 24, 2015 at 4:24 pm #30629In reply to: Date not always showing
RossKeymasterHi Daniele
I’ve no idea what hte issue was, but the code you supplied above worked perfectly.
I just pasted this to the top of
results.phpand it worked!If you wish to do some clever things, like hyperlink the category names or anything like that, then you would need to access the array (“Get an array of filters with values and labels”):
and do some processing yourself.
Thanks
November 22, 2015 at 10:49 pm #30447Topic: Adding post meta in search results
in forum Search & Filter Pro
AnonymousInactiveI have customized the search results page to remove post summaries, by copying results.php into my theme template folder, and it’s working nicely. Now, I’d like to add a post meta field (“wp_review_total”) into the search results, so my display would look like:
the_title
** post-meta-field **
the_category
the_tagsIs this possible?
November 17, 2015 at 1:16 am #29976In reply to: Sort by Custom Post Type
AnonymousInactiveHi Ross,
I still cannot get this to work using the results.php or my regular template loop.
Have tried a bunch of stuff.
Any chance of some detailed instructions on how to get this going?Cheers,
DanNovember 16, 2015 at 10:13 am #29915In reply to: Search not displaying results
RossKeymasterWell somewhere in your template I think you are using really old pagination.
Something like calls to the functions
sf_paged_linksEither way, you can find out exactly what line errors are being created and the lines with your pagination by checking your error logs.
Then, you need to replace this with the correct usage of WP pagination. As mentioned already in the above link, this can be found in the sample template in
search-filter-pro/templates/results.phpThanks
November 12, 2015 at 1:42 pm #29668In reply to: Place search field on archive with shortcode?
AnonymousInactiveI couldn’t get it to work as an archive. I ended up using the shortcode and just rebuilding the results.php page around your loop. I’m pretty sure it has something to do with how I was trying to use the loop in my template for the archive.
November 10, 2015 at 11:42 am #29371In reply to: Pagination wp-pagenavi not working in search results
RossKeymasterHi Martin
Did you check the included
results.phpfor the correct way to use wp-pagenavi plugin?This can be found in:
wp-content/plugins/search-filter-pro/templates/S&F does not use the
pagedvariable generally, and because the shortcode runs its own query, it must be passed into the pagenavi function:wp_pagenavi( array( 'query' => $query ) );Thanks
November 9, 2015 at 7:45 pm #29282In reply to: How to use it with EDD without Shortcode
RossKeymasterHi Yacine
I see what you mean now.
You cannot use S&F with custom queries – ie, you cannot wire it up to a custom
WP_Querythat is created somewhere else.What you would need to do is use S&F to create the whole query, and then customise the results.
What I think is best to do in this case is to create the query with S&F
http://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/
Make sure to complete the step about customising the template.
Then the template file
results.phpwould have your loop.I would then substitute the loop with the same structure as above and add in
get_template_part( 'partials/content-download-thumbs' );The EDD specific support only works with EDD downloads shortcode itself.
Thanks
November 9, 2015 at 6:05 pm #29244In reply to: 2.0.2 upgrade: results found, but not displayed
RossKeymasterHi Tim
I see the issue.
Because your templates are based on an old version of S&F, your template is calling a function which no longer exists in S&F – and causing this error.
You need to update your templates to use regular WordPress pagination instead:
https://support.searchandfilter.com/forums/topic/auto-cache-rebuild-caching-issue/#post-29048
Ohhh I see, you are using pagination from a very old version of S&F.
I’ve since removed the custom S&F pagination in favour of using WP standards.
So now for pagination check the updated
results.phptemplate located atsearch-filter-pro/templates/results.phpfor example usage of pagination.This also means there is out of the box support for the wp-pagenavi plugin which allows you to do even more cool things 🙂
Thanks
November 6, 2015 at 11:32 am #29048In reply to: Auto cache rebuild / caching issue
RossKeymasterOhhh I see, you are using pagination from a very old version of S&F.
I’ve since removed the custom S&F pagination in favour of using WP standards.
So now for pagination check the updated
results.phptemplate located atsearch-filter-pro/templates/results.phpfor example usage of pagination.This also means there is out of the box support for the wp-pagenavi plugin which allows you to do even more cool things 🙂
https://wordpress.org/plugins/wp-pagenavi/
Thanks
-
AuthorSearch Results
Search Results for 'results.php'
-
Search Results
-
I have customized the search results page to remove post summaries, by copying results.php into my theme template folder, and it’s working nicely. Now, I’d like to add a post meta field (“wp_review_total”) into the search results, so my display would look like:
the_title
** post-meta-field **
the_category
the_tagsIs this possible?