Continue reading Menu problems in multisite search

Menu problems in multisite search

Sometimes multisite searches cause problems in navigation menus. This is caused by pages from another subsite going into the page cache, and then replacing a page in the navigation menu with the same page ID. If you’re having this problem, adding the following code to the theme functions.php should solve the issue.

Read more Menu problems in multisite search 0 Comment on Menu problems in multisite search
Continue reading Indexing usermeta fields in Relevanssi

Indexing usermeta fields in Relevanssi

Relevanssi Premium can index user profiles. Users may have meta fields attached to them: there’s a wp_usermeta database table, even though the user editing interface by default doesn’t have any tools to add meta fields to users. Codex includes documentation on how to use the user meta fields. Read Working with User Metadata for code…

Read more Indexing usermeta fields in Relevanssi 2 Comments on Indexing usermeta fields in Relevanssi
Continue reading Controlling attachment types in index

Controlling attachment types in index

Relevanssi lets you index attachments. But perhaps you only want to index a particular type of attachment? Relevanssi settings don’t have any control over that, it’s either all attachments or nothing. It is possible to choose which kinds of attachments are indexed. It is done with the relevanssi_indexing_restriction filter hook,……which lets you control which posts are indexed. You can use the attachment MIME type to see which kind of attachment it is and use that information to weed out unwanted attachments. No images To remove all image attachments from the index, add this code to your site and rebuild……the index. It will weed out all attachments that have a MIME type that begins with image. add_filter( ‘relevanssi_indexing_restriction’, ‘rlv_no_image_attachments’ ); function rlv_no_image_attachments( $restriction ) { global $wpdb; $restriction[‘mysql’] .= ” AND post.ID NOT IN (SELECT ID FROM $wpdb->posts WHERE post_type = ‘attachment’ AND post_mime_type LIKE ‘image%’ ) “; $restriction[‘reason’]…

Read more Controlling attachment types in index 16 Comments on Controlling attachment types in index
Continue reading Keyword-based search blocking

Keyword-based search blocking

…$term ) !== false ) { http_response_code( 410 ); exit(); } } } } Now any searches that include the blacklisted terms stops WordPress execution immediately, returning a 410 Gone status so that if Google ends up indexing the spam search pages, it will know the pages shouldn’t be indexed….

Read more Keyword-based search blocking 11 Comments on Keyword-based search blocking
Continue reading Premium 1.14.9

Premium 1.14.9

I was alerted yesterday that Relevanssi Premium has a XSS vulnerability. If you are using the “Did you mean” feature, it is possible to construct a search query that contains scripts that are automatically run on the page if the “Did you mean” feature runs. See DXWSecurity report on the vulnerability. Version 1.14.9 fixes this…

Read more Premium 1.14.9 0 Comment on Premium 1.14.9
Continue reading Premium 1.14.8

Premium 1.14.8

Relevanssi Premium 1.14.8 includes one major bug fix, few smaller improvements and a new feature. An improved version of the sorting function will not throw notices when Intuitive Custom Post Order plugin is used. New filter: relevanssi_missing_sort_key can be used to adjust the result sorting when using keys that are not present in all posts…

Read more Premium 1.14.8 0 Comment on Premium 1.14.8