Forums Forums Search & Filter Pro Sticky Custom Posts

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Anonymous
    #181893

    Hey,

    Is there a way how to have the admin choose to have some posts Stickied? (We are using Custom Posts)

    They want to have certain materials always show up first in search results.

    Trevor
    #181908

    I would add a custom field plugin like ACF, then create a field group for that Custom Post Type and add a field to it where the admin can select Sticky or Not Sticky, and use the S&F sort option to sort on the Meta Key. Note that ACF makes three keys per field, so look for the one named without a preceding underscore when selecting the key to sort on.

    Note also that every post will need to be opened and a value set and then saved, because otherwise any post with no value in that field would disappear from the results (a side effect of sorting). Make sure, therefore, that when defining the field in ACF, it has a default value of Not Sticky. You could use a logical type field or a select list (dropdown or radio button).

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