-
AuthorSearch Results
-
February 21, 2019 at 5:05 pm #202886
In reply to: Changing the Changing the Title in the Browser Tab
TrevorParticipantSorry for the delay. I am working my way through a backlog in oldest touched order first, so I have just gotten to this one.
Your form uses As an Archive, so I presume it is using search.php also. Note that, when using Ajax, the Page Title will not change, so it is better to set it to something generic.
Assuming you are using a child theme (you should be), make a copy of the search.php template file and rename it, e.g. search-results.php and place this in the child theme folder.
Then edit the the file and find the header part (on line 19 I think):
<?php printf( __( 'Search Results for: %s', 'twentyseventeen' ), '<span>' . get_search_query() . '</span>' ); ?>
and replace that with some Text, like
Search Results
February 18, 2019 at 11:43 am #202554In reply to: Hidden field
TrevorParticipantThis may help you code it into the results.php file:
February 15, 2019 at 9:25 am #202327
AnonymousInactiveThanks for your reply 🙂
Sorry I’ve been at this for hours and I still can’t get this to work. I installed the divi add-on and followed the instructions. It wasn’t displaying any results so I added a test post (that was an actual wp post, not a post in the taxonomies I created). It now shows that one post – so it won’t display any of the other taxonomies that you helped me to set up. Will this method only work if I’m using posts taxonomy? Because the divi blog module usually only displays posts, but I’m no longer user any posts – they’re all under taxonomies like courses, workshops etc…tried the portfolio module and that also only shows that one test post too. And just as a side note, when I click to filter by category for that post, it doesn’t matter which category I click, the test post remains even though I only added it to one category.The only thing that seems to be working for me is the shortcode display. But customising the results.php page is beyond me 🙁
February 13, 2019 at 3:24 pm #202123In reply to: results display
AnonymousInactiveOK, so are we talking about the results.php file in the Templates folder, in the search-filter-pro folder?
Do I call the new sub-folder search-filter or search-filter-pro?
Is the ID number to replace you refer to in the above example the number here – get(36613)?
Do I paste the entire results.php after the comment out line //?
i.e. replace “your current results.php code here” with the complete results.php code?Also, how do I prevent the date of the post showing in the results?
As far as I can see, I’ve turned off meta.February 13, 2019 at 2:53 pm #202121In reply to: results display
TrevorParticipantIf you are using our Shortcode Display Results method, then the results.php needs to be modified like this (where the ID number will need to be changed to match your form ID):
global $searchandfilter; $sf_current_query = $searchandfilter->get(36613)->current_query(); if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) { echo '<div>Nothing to see here folks!</div>'; } else { // your current results.php code here }
If using other methods, and if you have access to the template PHP files, you could use similar code.
Make sure any files you modify are in the child theme folder (if you copy our results.php file, it needs to be in a sub-folder of the child theme, called
search-filter
, not our plugin folder or a parent theme folder).February 12, 2019 at 7:04 pm #202083Topic: Display custom meta value in results
in forum Search & Filter Pro
AnonymousInactiveHello,
I am trying to edit results.php that i moved to created folder in my theme folder. i did some testing with echo and that part is done correctly. So, I’m using CPT and i have custom fields in my custom post type “nekretnina” that i’m applying search for and I’m getting the results, but i want to show custom fields from those results that im searching for in my results.
Example.
CPT nekretnina is searched by price,
CPT has the custom meta field brojsobe.How do i call this custom field in the while loop in results.php so that i can show it in my page.
Very Respectfully, Dan.
February 12, 2019 at 10:54 am #201942In reply to: Results Shortcode
TrevorParticipantTo show them in columns (effectively a grid, would mean you would need to code the template to have HTML and CSS to make this happen.
As you are using our shortcode method the display of the results comes from our results.php file. You would need to customise it as described (in basic form) here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
You need to remove the lines::
<p><?php the_category(); ?></p> <p><?php the_tags(); ?></p> <p><small><?php the_date(); ?></small></p>
To remove the featured image, remove these lines:
<?php if ( has_post_thumbnail() ) { echo '<p>'; the_post_thumbnail("small"); echo '</p>'; } ?>
February 11, 2019 at 4:59 pm #201905In reply to: Customize the Search Results Page
TrevorParticipantThe HTML shown there (the part that starts
div id=lightgallery-1"
) is not from our normal results.php file. Are you able to show me the PHP/HTML that makes that part?February 7, 2019 at 5:10 pm #201618In reply to: Current menu item
AnonymousInactiveI’ve set it up like this. Works fine. Only with the problem that it shows all posts at first load. I need it empty
[searchandfilter id=”36613″ action=”filter_next_query”]
[post_grid id=”40757″]If I understand correctly I have to put your code in a results.php
I can’t find such php in the “post-grid” – plug-ins phps
Also not in the Standart WordPress directory…February 6, 2019 at 1:28 pm #201415In reply to: Show all results override settings in filter
AnonymousInactiveThanks for the advice. That’s nice didn’t know renaming result to the form ID will work and make it possible to have multiple result.php versions.
The map is crashing the server (haha) so you were right. Now we try another code structure on the map results.php so we don’t have to generate so much at once and try to do some lazy loading. Hope we will get it to work.
-
AuthorSearch Results