Continue reading bbP Private Groups support

bbP Private Groups support

Private Groups is a plugin that makes bbPress forum groups private. Relevanssi, however, doesn’t understand that privacy and will show those groups in the search results. Relevanssi has means to support this, however, with the help of the relevanssi_post_ok filter. Here’s some code from Mark Wass that makes the private forum posts private in search.…

Read more bbP Private Groups support 0 Comment on bbP Private Groups support
Continue reading Indexing custom post statuses

Indexing custom post statuses

If you’re using custom post statuses, Relevanssi requires some tinkering. By default, Relevanssi only handles posts that are of status publish, pending, draft or private. Relevanssi has a filter that lets you add more statuses to the list of acceptable statuses for Relevanssi: function rlv_add_status($status_array) { $status_array[] = "new_status"; return $status_array; } add_filter(’relevanssi_valid_status’, ‘rlv_add_status’); add_filter(’relevanssi_valid_admin_status’,…

Read more Indexing custom post statuses 0 Comment on Indexing custom post statuses
Continue reading Membermouse support for Relevanssi

Membermouse support for Relevanssi

If you’re using MemberMouse to manage memberships on your site, having Relevanssi co-operate with MemberMouse is easy. Just add the following code to your theme functions.php and your protected content will not be displayed to users without access to the content: add_filter(’relevanssi_post_ok’, ‘membermouse_relevanssi_ok’, 20, 2); function membermouse_relevanssi_ok($post_ok, $doc) { if (function_exists(’mm_access_decision’)) { $post_ok = mm_access_decision(array("id"=>$doc,…

Read more Membermouse support for Relevanssi 0 Comment on Membermouse support for Relevanssi
Continue reading Private posts in custom post types

Private posts in custom post types

UPDATE 15.5.2018: Relevanssi doesn’t have the relevanssi_private_cap filter hook anymore. Relevanssi should be able to get the correct capability automatically, if it has been registered within WordPress. If something doesn’t work as expected, then creating a relevanssi_post_ok filter function is the way to go. Relevanssi has some problems when it comes to checking if it…

Read more Private posts in custom post types 10 Comments on Private posts in custom post types
Continue reading Relevanssi_post_ok filter

Relevanssi_post_ok filter

Versions 2.9.8 (free) and 1.5.13 (premium) added a new filter, relevanssi_post_ok, which can be used to add support for membership plugins where there is a need to restrict certain posts from certain users. By default, this filter calls relevanssi_default_post_ok(), which has built-in support for private posts, Role-Scoper and s2member. Add your own function, if you…

Read more Relevanssi_post_ok filter 3 Comments on Relevanssi_post_ok filter