Forums › Forums › Search & Filter Pro › Need some custom work done to results.php
- This topic has 10 replies, 4 voices, and was last updated 8 years, 7 months ago by Ross.
-
Anonymous(Private) June 19, 2015 at 8:39 am #19836
Hows it going?
So heres my situation. I am using classipress + search filter pro. One thing I plan to use on the site is featured ads that utilize the stickypost feature. Problem is, on the search results page, in addition to posts matching my search query meta, sticky posts that dont match search query meta are also displayed. Ive tried every way I can think of to get this to work I want to no avail. Using your shortcode to display results works the way I want it too (ignores sticky posts) but the results layout is not ideal and not consistent with listings in index and post archives. Ive had no luck modifying the results.php file to my liking (although i came somewhat close) as my skill level is no where near that of yours. My proposal is I hire you to make the modifications I require. Id setp a clone site with admin + FTP access. Please let me know if this something you are available for. Thanks!
Anonymous(Private) June 19, 2015 at 9:40 am #19837or perhaps just another solution may work? i see there is a file class-search-filter-setup-query.php, perhaps you can add and ignpre_sticky_posts somewhere? this would work for me. a more appropriate solution would be just displaying the results including sticky posts if they match the search query.
Anonymous(Private) June 19, 2015 at 6:27 pm #19871Are you using a custom post type for your Ads? If so, on the “General” tab for the search filter you can exclude that CPT by ensuring that the box is UNchecked.
You can still make custom post types “sticky” via a plugin called “Seamless Sticky Custom Post Types”….it’s the best way I’ve found to add support for “sticky posts” to Custom Post Types.
If you’re not using a CPT for your ads, post back how you are doing it, and I may be able to suggest a way to eliminate them from the search query.
Anonymous(Private) June 19, 2015 at 10:01 pm #19884Hey Ryan, were you intending to post a private reply to Ross (the developer)? Normal forum users such as myself, who are trying to help others, cannot see private replies.
If that was your intent, no worries, if not and you still need help, I’m willing to see if I can help you if you’ll repost your reply and not check ‘set as private’.
Anonymous(Private) June 19, 2015 at 11:27 pm #19886Here is what I posted above. Thanks
Hi Trisha thanks for responding.
The custom post type is not the problem, I have selected the correct one for the search form. When I do a search the proper post type is included. The problem is, when using the sticky function, When I do a search sticky posts, regardless of whether they match the search query are being displayed.
For example, I do a search with criteria where no posts should match.
The search result page displays: Search for โ*โ returned 0 results
However, the sticky posts are there.
Anonymous(Private) April 8, 2016 at 12:33 am #42013Ryan/Ross, I’m having the same issue.
I need to use sticky posts on a client’s site but they show up in the results even if they do not match the search criteria. They are too sticky. The behavior I want to see is that when the user first lands on the archive page the sticky posts are listed. As soon as the user performs a search the sticky posts should be ignored and those posts should only show up in results if they match the search.
Is there a solution for this?
-
AuthorPosts