Forums Forums Search & Filter Pro Need some custom work done to results.php

Viewing 10 posts - 1 through 10 (of 10 total)
  • Anonymous
    #19837

    or 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
    #19871

    Are 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
    #19872
    This reply has been marked as private.
    Anonymous
    #19884

    Hey 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
    #19886

    Here 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
    #19887

    Ideally, only sticky posts that match the criteria are listed in search results.

    Anonymous
    #19924

    I am getting this worked out by some else. I recommend to the developer, try to get listed on the appthemes.com marketplace. Your plugin is exactly what alot of people are looking for. Pretty sure I referred a sale today ๐Ÿ™‚ Thanks

    Ross Moderator
    #19977

    Ah fantastic, thanks for the update ๐Ÿ™‚

    Anonymous
    #42013

    Ryan/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?

    Ross Moderator
    #42303

    Hey Keith I’m afraid not.

    In our WP queries we just pass the sticky param through – ignore_sticky_posts – https://codex.wordpress.org/Class_Reference/WP_Query

    Unfortunately this does not take into consideration the other search options… I’ll look into the improving this so there will be another option which would only show stickys if they matched all search criteria.

    I’ve stuck this on the todo list for now.

    Thanks

Viewing 10 posts - 1 through 10 (of 10 total)