Forums › Forums › Search & Filter Pro › Sticky posts in search results
- This topic has 6 replies, 2 voices, and was last updated 7 years, 7 months ago by Anonymous.
-
Anonymous(Private) May 12, 2017 at 3:04 pm #108492
Hello,
I use Search and Filter PRO. I display search results using shortcode – search and filter is in sidebar with ajax activated. When I don’t filter or search through results, my page displays all the results.
Is there a way to display some posts higher than others? I have posts that should be featured on top.
I have Relevanssi plugin.
I would be grateful for any tips or solutions. Thank you!Trevor(Private) May 12, 2017 at 3:31 pm #108503Are the posts in WordPress marked as ‘sticky’? AFAIK the default behavior for our plugin is that sticky posts come first. Did you try this and did it work or not?
OTOH, if you have a custom field with a boolean field ‘Featured’, you could use our sort order on that field, but beware! The field MUST have a default value for new posts, and a value must be entered for all existing posts. When you make a sort order, any post with no value in the field you sort by will be excluded from the results.
Anonymous(Private) May 17, 2017 at 7:42 pm #109561Hello,
I recently asked you about adding sticky posts to search results.
I marked selected posts as sticky, but they show even when they don’t match the filtering (I filter through title, categories, tags, and text, I also use relevanssi plugin).Thank you one more time for your help.
Anonymous(Private) May 18, 2017 at 11:29 am #109652You’re right, I marked them as sticky.
Could you please guide me how to make my posts featured?
Should I do it with additional plugin? If so, could you recommend any? I use Custom Post Type UI for custom post types, taxonomies etc.I also tried something different:
I added custom field to my post with numeric value (featured_1).Then EDIT SEARCH FORM -> SETTINGS & DEFAULTS -> POSTS ->
Sticky Posts: Default Order:
Choose Meta Key: featurd_1 (numerical)
Secondary Sort Order: TitleI thought it will display featured, then sort the rest by title. Is it possible? Thank you for your time.
Trevor(Private) May 18, 2017 at 11:41 am #109655This post is much the same question (with the answer). The private replies are not important. Read it all before you do it!
https://support.searchandfilter.com/forums/topic/featured-posts/
-
AuthorPosts