Posted on

Pinning posts

Sometimes you want to get a specific post as the first result for a certain search, but Relevanssi doesn’t return the right post as the first result by itself for some reason. Relevanssi Premium has a tool for these situations: pinning.

Pinning lets you specify keywords for each post and whenever that keyword is used in the search, the post will appear as the first result. If multiple posts are pinned for the same keyword, they will appear in their natural order. It’s also possible to pin a post for all searches it appears in, ie. whenever the post would be included in the search results, it comes up first.

How to use pinning

Pinning is done from the post edit page. Relevanssi Premium adds Relevanssi controls to all post types that are indexed. In the block editor the Relevanssi controls are somewhat hidden by default, but can be found from the “three dots” menu on the top right:

If you want easier access to the Relevanssi controls, you can add them to the toolbar from the star button:

The pinning settings can be found under “Pinning”. The “Pin this post for all searches it appears in” checkbox pins the post for all keywords, it’s practically equivalent to adding all words in the post to the keyword field.

In the classic editor the Relevanssi Premium controls are generally always visible, but if they’re not, you can enable them from the “Display options” settings on the post edit page.

2 comments Pinning posts

  1. So WooCommerce products use the “classic editor” still for some reason. The “Screen Options” in a product doesn’t have a Relevanssi option, and I can’t find the Pinning feature anywhere for products. Any help on how to activate the pinning feature on Products for WooCommerce would be RAD! thanks. ๐Ÿ™‚

    1. Josh, the “Relevanssi” metabox should be in the “Screen Options” list, but only if the product post type is enabled in the indexing settings and if the user has high enough capabilities. This used to require “admin” level access; it was changed to “editor” in 2.15.3, but authors still can’t see it. If you want authors to see the metabox, you can use the relevanssi_sidebar_capability filter hook to adjust the minimum capability to publish_posts to allow authors to see it.

Leave a Reply

Are you a Relevanssi Premium customer looking for support? Please use the Premium support form.

Your email address will not be published. Required fields are marked *