Continue reading Wishlist Member: Sorting the posts by membership levels

Wishlist Member: Sorting the posts by membership levels

…The post object to check. * * @return boolean True if post is on the specific level. */ function rlv_free_filter( $post ) { $free_posts = rlv_generate_level_post_list( 1313127748 ); return isset( $free_posts[ $post->ID ] ); } /** * Comparison function for array_udiff: post objects are considered * equal if they have……level posts and uses that check whether a post is on that list or not. The function that gets the list of post IDs will do that once, and will then just return the list on later calls. /** * Generates the list of posts for the specific membership level….…} if ( empty( $rlv_wishlist_level_posts[ $level ] ) ) { $results = wlmapi_get_level_posts( $level ); $rlv_wishlist_level_posts[ $level ] = array_fill_keys( array_column( $results[‘posts’][‘post‘], ‘ID’ ), true ); } return $rlv_wishlist_level_posts[ $level ]; } /** * Filter function that returns true if posts is on the specific level. * * @param WP_Post

Read more Wishlist Member: Sorting the posts by membership levels 0 Comment on Wishlist Member: Sorting the posts by membership levels
Continue reading Premium 2.6 / Free 4.5

Premium 2.6 / Free 4.5

…automatic update. The download page shows two different versions of the plugin available. The basic version no longer includes tests or anything else you won’t need when actually using the plugin. The developer version includes tests and all sorts of other tooling you may find interesting if you’re a developer….

Read more Premium 2.6 / Free 4.5 5 Comments on Premium 2.6 / Free 4.5
Continue reading Partial matches to just one custom field

Partial matches to just one custom field

Is it possible to set (with filters and/or actions/functions) Relevanssi to use whole words keyword matching for post titles and 2 custom fields, and partial keyword matching only for a specific custom field (sku in this case)? Indeed it is! That is, you can’t set different keyword matching methods to different parts of the post,…

Read more Partial matches to just one custom field 0 Comment on Partial matches to just one custom field
Continue reading Excluding old content from the search

Excluding old content from the search

Is there a way to exclude anything before 2016 from search results? Yes. There are two approaches to this. If you never want to see anything old in the results, it’s best to filter in indexing with relevanssi_indexing_restriction. Add this to your site: Note that the restriction explains which posts are included in the index,…

Read more Excluding old content from the search 2 Comments on Excluding old content from the search
Continue reading Premium 2.5 / Free 4.4

Premium 2.5 / Free 4.4

Relevanssi Premium 2.5.0 and Relevanssi 4.4.0 add new features and fix bugs in Relevanssi. Premium gets more updates this time, but the free version gets couple of helpful bug fixes, so this version is definitely worth the update. Versions 2.5.1 and 4.4.1 are a quick fix for a problem with missing stopwords in the new…

Read more Premium 2.5 / Free 4.4 0 Comment on Premium 2.5 / Free 4.4
Continue reading Restrict search by author from the search query

Restrict search by author from the search query

You can set Relevanssi to index the post author, which will then let you find posts by searching for the name of the author. But what if you want a stricter filter? Where searching for an author would only show posts by that one author and nothing else? That’s possible too. Add this function to…

Read more Restrict search by author from the search query 0 Comment on Restrict search by author from the search query
Continue reading Premium 2.4.4 / Free 4.3.4

Premium 2.4.4 / Free 4.3.4

Premium 2.4.4 and free 4.3.4 fix couple of long-standing bugs. The process of taking Relevanssi to 100% testing coverage proceeds and going over all the code systematically helped me find and fix a bug that had plagued comment indexing for a long time. New features Premium only: You can now target specific parts of the…

Read more Premium 2.4.4 / Free 4.3.4 0 Comment on Premium 2.4.4 / Free 4.3.4
Continue reading Target specific part of the post

Target specific part of the post

…another post. excerpt: Post excerpt. media: Attachment content (coming in the next version). taxonomy slug: Taxonomy name (use tag or post_tag for tags, category for categories and the taxonomy slug for other taxonomies). custom field name: Custom field name. These are all compared against Relevanssi index, so you can use……posts that have the word “knizia” in the taxonomy “designers” and the word “dutrait” in the taxonomy “illustrators”: {designers:knizia} {illustrators:dutrait} Note that for multiple targeted terms, you need to have a space between the terms. Search for posts that have the phrase “Reiner Knizia” in the taxonomy “designers”: {designers:”reiner knizia”}……specifier for each word separately. Phrases are supported. Examples: Search for word “cat” in titles only: {title:cat} Search for word “dog”, but only in tags: {tag:dog} Search for posts that have the word “knizia” in the taxonomy “designers” and the word “dutrait” in the taxonomy “illustrators”: {designers:knizia} {illustrators:dutrait} Note that…

Read more Target specific part of the post 3 Comments on Target specific part of the post
Continue reading Premium 2.4.3

Premium 2.4.3

Relevanssi Premium 2.4.3 is a bug fix release that fixes two rather nasty bugs in 2.4.2. Bug fixes Disabling update_post_metadata_cache seemed like a good optimization move for related posts, but it turns out it also disables related posts thumbnails. We’ll take weaker performance with working images, so that optimization move has now been revoked. Importing…

Read more Premium 2.4.3 0 Comment on Premium 2.4.3