Forums › Forums › Search & Filter Pro › Promoted posts?
Tagged: promoted posts
- This topic has 4 replies, 1 voice, and was last updated 1 year, 6 months ago by Anonymous.
-
Anonymous(Private) April 10, 2018 at 7:55 pm #171319
Hi,
I have been using this plugin for a while, and I am very pleased with the results. I am currently looking into promoting/stickying posts, which then ensures that those posts are always on top when it is one of the search results.
To give an example:
Only one post is stickied/promoted, and it is about cars. Before the user has done any categorizing, the post is on top (since it is one of the results for “all”). Then, when searching for “car”, it is still on the top. When the user searches for “boat”, the stickied post is no longer visible.Do you have any ideas of how this could be accomplished?
What I imagine is the ability to give a post a category/metadata, which is then somehow prioritized. It should not be a necessary to search for “stickied”/category “stickied”.
I use the plugin with relevanssi.
Thank you in advance. Love the plugin and the support you give.
Trevor(Private) April 11, 2018 at 4:09 pm #171531You would probably have to create a custom field, let us call this field
promoted
and then make that the primary sort key.BUT, every post would have to have a value in this field, otherwise the post would be missing from results if left empty.
So, IF you used ACF and made such a field (and the true key name would be
promoted
and NOT_promoted
) you should NOT make it a logical field. Instead make it either a radio button field ofYes
orNo
options, or a dropdown, and define a default value ofNo
.You would have to go back and edit every post to make sure that they have a value.
Then you don’t have the problem of sticky posts always being there.
Trevor(Private) April 11, 2018 at 9:00 pm #171682The standard method to solve this pagination issue is, ridiculously, to simply hide the pagination. If you were using our shortcode method, you can make custom results.php files (numbered to match the form ID), and in those you can remove the pagination entirely.
And yes, you would have to edit the results.php HTML and classes to replicate the layout that EDD uses.
Anonymous(Private) June 5, 2023 at 11:54 pm #276816Hi! I’m trying to follow these instruction for what I believe is the same goal, but I’m clearly doing something wrong – I’m not getting any search results after I set it up the new way.
In my case it’s people, not cars; but otherwise the same: I’d like search results to be sorted by first name BUT if someone has “featured” set to “yes”, (an ACF field I’ve set up), I’d like them to come first in the search results regardless.
I added a Button Group named “featured” with Yes and No options, and No as the default.
Right now everybody has this set to “No”.
In the search form settings, under the Posts tab, I tested setting the Default Order to “Meta value” and choose “featured” (no leading underscore). Secondary sort order was set to “first_name”. But whatever I search on with these sorting settings, I never get any results.
If I only order by first name, then I get the expected list of people.
Am I misunderstanding something about how to implement this?
Thanks!
-
AuthorPosts