-
AuthorSearch Results
-
January 27, 2017 at 6:11 pm #86196
In reply to: Filtering the default WordPress Search
TrevorParticipantThe shortcode method uses our own template (results.php), and in that you can put the same code as is used in the search.php file, but it will draw the results from our loop.
January 25, 2017 at 4:48 pm #85392
TrevorParticipantIf yuo did not touch anything, who added this line:
<?php echo ( $module->get_meta_data() );?>
in place of the code I wrote in the results.php?
That line is causing the code to fail.
January 24, 2017 at 11:10 pm #85132In reply to: Automatic Number for each search result
AnonymousInactiveEach media file is related to more than one specific product so that will make it too confusing.
Adding a custom field to each media file sounds very time consuming.
I found the solution by displaying the post ID.
I added this into my custom results.php
<?php echo get_the_ID($post->ID); ?>
Thanks again for your help!! Much appreciated.
This topic is now resolved.
Regards,
January 24, 2017 at 10:43 pm #85131Topic: Almost there, struggling with last steps
in forum Search & Filter Pro
AnonymousInactiveHi there!
I just bought Search & Filter Pro tonight and I’m struggling to complete the last steps of the setup. I am using EDD and the Marketify theme. I have updated my theme’s functions.php file and also added the results.php file to my theme. I have been trying to display my new search and filter via ShortCode, an EDD Downloads page and via a widget but I am unable to complete any of these.
The search is behaving correctly with the Shortcode method however the display is not nice. In this case, the search is on the top left of the page. The results are displayed in large tiles at the bottom of the page. It looks nothing like the neat movie demo.
The EDD method [searchandfilter id=”291″ action=”prep_query”][downloads columns=2 number=4] causes no search to be displayed on the page but the tiles look ok.
The widget approach has the best look as I have been able to display the search on the right sidebar with the downloads on the left. However in this case the search is not interacting with the downloads.
I would love to get one of these approaches working and would really appreciate your help on this. Thanks in advance!
January 24, 2017 at 7:36 pm #85075
TrevorParticipantI am not normally available in the evenings. This type of work is done voluntarily by me. The hours I have spent on this are way beyond normal support. So please, do not presume too heavily on my personal time.
It occurs to me that, from your posts, that you are a capable coder. The php that generates the normal loop must contain a loop query (usually a call to wp_query) and S&F has a mode to use that; the Custom mode.
All you need do is find the arguments passed to that query, or the part where the posts are looped through, and use the information in this post:
https://support.searchandfilter.com/forums/topic/manually-add-sf-to-an-existing-query/#post-81577
I have much of this afternoon coding into results.php in my own way what the code you then gave me does. Had I known that code, I could have saved at least two hours of work 🙁
January 23, 2017 at 10:42 pm #84791In reply to: Automatic Number for each search result
AnonymousInactiveHi,
Yes thats correct, shortcode method with a customised results.php template.
I am unsure about this, I have had a look and can’t see any? The gallery is displaying media files only.
January 23, 2017 at 12:00 pm #84567In reply to: Automatic Number for each search result
TrevorParticipantYou are using the Shortcode method with a customised results.php template?
Does each post have an order code stored in a custom field that you could display somewhere?
January 22, 2017 at 5:38 pm #84397
TrevorParticipantThis email ping pong is taking up way too much of my time. I said that the format of the posts is because the results.php needs editing, but using VC grid is a much better option.
This is my family time, please call me so we can voice chat this through?
January 22, 2017 at 5:31 pm #84386
AnonymousInactiveBy the way i still want you to see the main page. I copied results.php and followed the steps as shown in the documentation and bingo the results are not showing by default but it’s messing with the layout, plus it’s only filtering 3 posts :/ that’s weird
January 22, 2017 at 3:15 pm #84365
TrevorParticipantHi Jooobs
It is the weekend and official support is closed until 10AM UK time tomorrow. But I am here waiting for a sports match to start on TV in 5 minutes. The behaviour you describe is normal in that by placing a search form and results section on a page, the WordPress ‘loop’ will run and display unfiltered total posts.
Second, as you are using the Shortcode display method, this will use the (customizable) results.php template that is included with our plugin, and not your theme’s templates.
It is possible to modify the results.php template, as described here.
I will help you get to where you want, and it IS possible to make it so that on an unfiltered page, no results are shown. It is also possible to show a grid, depending on how you theme normally does this. This post might guide you whilst we are offline:
-
AuthorSearch Results