-
AuthorSearch Results
-
May 3, 2016 at 7:26 pm #44623
In reply to: custom theme search result problem
TrevorParticipantThanks. That template file is very specific to displaying searches within the theme and will not allow our search system to display (at least, not easily, but we may have to try that).
You have the search placed at the top of the right sidebar, yes? Is it possible to do this using a shortcode in this theme, and for the results page to have the results shortcode in it?
The results will not look so good, but that we can fix with a custom results.php file.
April 29, 2016 at 12:20 pm #44355In reply to: Configure not showing
AnonymousInactiveSays Error: The custom template file
results.phpcannot be found – go to Display Results tab to fixApril 29, 2016 at 12:17 pm #44354In reply to: Configure not showing
AnonymousInactiveThis is the output with results.php
http://www.thoughtmechanics.co.uk/search/?_sft_category=apartment
I will send you the result page with shortcodes, however the portfolio text is below image.
April 29, 2016 at 12:11 pm #44346
AnonymousInactiveHello,
I have problem with mgration from S&F 1.4 to 2.1
I need two dropdowns based on post_meta – ACF date: YYYYMMDD.
There must be only eyars, means options: 2016 2015… 2006 ‘2005 and prior’
In S&F 1.4 I managed tosimply hack ‘class-search-filter-get-results.php’ using something like this:
…
else if($meta_field[‘meta_type’]==”choice”)
{
if ($key == ‘news_date’ || $key == ‘press_date’) {
if (intval($_GET[SF_META_PRE.$key]) == 2005) {
$minval = 19950000;
$maxval = 20051232;
} else {
$minval = intval($_GET[SF_META_PRE.$key])*10000;
$maxval = (intval($_GET[SF_META_PRE.$key])+1)*10000;
}
$meta_query =
array(
‘key’ => $key,
‘value’ => array( $minval, $maxval ),
‘compare’ => ‘BETWEEN’,
“type” => “NUMERIC”
);
} else {
….
Version 2.1.2 seems to be completely rebuilt and made much more complicated. Where is the place in S&F 2.1.2 to place such improvement? Or maybe this time there are more such places?
I’ve tried e.g. in class Search_Filter_Query but I failed.
RegardsApril 29, 2016 at 11:23 am #44338In reply to: Configure not showing
TrevorParticipantAh, I see. The layout of the post results is pretty much theme dependent. The demo is using one of the standard WordPress themes. By default, the layout of the results is down to the theme you are using.
The first thing is get the search functional, and then focus on appearance. Do you want it to look like that portfolio page you showed?
Do you have a working search to show me using the shortcodes method (the template must normally be results.php BTW)?
April 27, 2016 at 11:23 am #44110
TrevorParticipantHi
I will take these in reverse order!
3. Post type archive. In the theme, you have to place the search form using a widget area, by using the provided shortcode or search form widget. That assumes your theme gives you such a widget area. Failing that, you have have to manually edit the template.php for the page in question and add the shortcode using the wordPress do_shortcode function.
2. As an archive is the more complex and does require you to understand where and how to edit the theme’s files. Not easy if you do not know how.
1. As with 3, you still have to place the search shortcode on the page, but this method uses a template from within Search & Filter’s template folder, called results.php. You can copy this to your child theme folder (the instructions are on the documentation page) and the file is deliberately made less complex to allow easy editing, usually by cut and pasting the bits to where you want them, or removing bits, and the add HTML classes and id’s and other HTML structure so that the page matches what you see on a normal page in your theme.April 25, 2016 at 12:20 pm #43788In reply to: How do I hide initial results?
TrevorParticipantHi
Try this:
https://www.dropbox.com/s/73qfwma87p5efo8/results.php?dl=0
But edit line 25 and replace the ID number i used (1726) with the ID of your search form.
April 21, 2016 at 8:44 pm #43581In reply to: How do I hide initial results?
AnonymousInactiveHi Trevor,
I’ve tried using the Github code on my results.php but its not working. May I send you my page so you can see what I’m doing wrong?
Thanks,
ThaliaApril 21, 2016 at 5:37 pm #43573In reply to: Search in one category only
AnonymousInactiveHello Ross,
I needed a form to display results using Post Type Archive but I can’t have two forms (or more) that displays results like this, so I had to use Archive (which in my theme looks like a blog and it’s not useful for me).
So I spoke to Trevor about it and we had a skype videocall in which we found out that Avada wouldn’t let me use a custom results.php page.
The reason I need a custom results.php is because of the way search results are displayed in my website.
This is the form that displays results using Post Type Archive: http://www.edulynks.com/prueba
I use this form to search the availability of schools depending of the type of program (academic years, summer camps, etc) and country (USA, UK, France, etc).This is the form that filters results within a type of program using Archive: http://www.edulynks.com/campamentos-de-verano
I use this form to filter schools within a type of program, for example, if the program is summer camps, I want to filter those summer camps depending of the country (summer camps in canada, summer camps in france, etc).Originally what I wanted to do is use the Post Type URL to display results like Post Type Archive like I read here but I found out that it wouldn’t work because of Avada, so Trevor suggested that I use a custom Archive page (results.php). I placed my custom results.php in the /themes/Avada/search-filter directory but it’s giving me an error: “Error: The custom template file results.php cannot be found”.
Please tell me if I explained myself clearly or if you need extra information 😀
Thank you!
April 21, 2016 at 4:52 pm #43564
TrevorParticipantThe results you see are either made by a template in the theme, in which case you need to revert to the theme controls, or you are using the shortcode method, and using our results.php, in which case you can make one or more custom versions of the results.php file and place them in the child theme folder. In that you can add your own css classes and HTML structure, or decide what to show (or not). See here:
http://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/
-
AuthorSearch Results