Continue reading ACF: Indexing relationship content

ACF: Indexing relationship content

…know the exact field name. In that case you can use a direct database call to fetch fields using wild cards. This function would find a relationship field called people inside a flexible content field sidebar_groups: add_filter( ‘relevanssi_content_to_index’, ‘rlv_relationship_content’, 10, 2 ); function rlv_relationship_content( $content, $post ) { global $wpdb;…

Read more ACF: Indexing relationship content 2 Comments on ACF: Indexing relationship content
Continue reading Using AND and NOT for Boolean operators

Using AND and NOT for Boolean operators

Relevanssi Premium has support for in-query Boolean operators. Relevanssi uses + and – for the operators: cats -dogs and cats +kittens. If you prefer instead to use the verbal AND and NOT operators, it only takes one small function. Add this to your site: This function (on the relevanssi_search_filters hook) looks at the search query…

Read more Using AND and NOT for Boolean operators 6 Comments on Using AND and NOT for Boolean operators
Continue reading ACF: Indexing ACF fields for taxonomy terms

ACF: Indexing ACF fields for taxonomy terms

Advanced Custom Fields makes it possible to add custom fields to taxonomy terms. You can only do this with Relevanssi Premium because the free version of Relevanssi can’t index taxonomy terms. Suppose you set Relevanssi to index custom fields. Relevanssi won’t index these taxonomy custom fields because taxonomy terms aren’t generally allowed to have custom…

Read more ACF: Indexing ACF fields for taxonomy terms 2 Comments on ACF: Indexing ACF fields for taxonomy terms
Continue reading Index custom field contents

Index custom field contents

Custom fields (also known as post meta or meta fields) are a major part of WordPress the default search won’t search. That’s a big problem for people who use solutions like Advanced Custom Fields or Carbon Fields to develop sites: on sites developed with custom field plugins large parts of the post, content may be…

Read more Index custom field contents 50 Comments on Index custom field contents
Continue reading SearchWP Live Ajax Search

SearchWP Live Ajax Search

…One example is searching for attachments. By default, SearchWP Live Ajax Search doesn’t include any attachments in the search results. The post type is not a problem, but the post status is: SearchWP Live Ajax Search includes only posts with the post status publish, while attachments have a status of…Relevanssi doesn’t ship with a live search or autocomplete feature that would display results as the user types the search terms. There are many other plugins that provide this functionality, but few of these plugins work with Relevanssi. SearchWP Live Ajax Search is the best one that does. It’s very……to include private posts for the users who are allowed to see them. Just removing the post_status parameter will include drafts in the results. Normally drafts shouldn’t appear in searches, but since the SearchWP Live Ajax Search is an AJAX search, it is done in admin context, where drafts are…

Read more SearchWP Live Ajax Search 13 Comments on SearchWP Live Ajax Search
Continue reading Indexing and searching PDFs in WordPress

Indexing and searching PDFs in WordPress

…service on a separate server. Which PDF files can you index? Since Relevanssi is a WordPress search, Relevanssi operates on WordPress posts (including all the different post types). So, to have Relevanssi index your PDFs, they need to be WordPress posts. That’s fortunately really simple: upload your PDF files to……or EU. You can choose from the settings which server you want to use. There the files are processed with Tika. While we don’t care what’s inside the files you index on our server, the server needs to make working copies. The server removes the documents after use. It is……attachments? Yes! Relevanssi can handle lots of different formats. Our server uses Apache Tika to process the files, giving us a wide variety of supported formats. The essential document formats are covered: Word documents (DOC and DOCX), Open Office documents (ODT), RTFs, etc. How does the attachment indexing work? Relevanssi…

Read more Indexing and searching PDFs in WordPress 78 Comments on Indexing and searching PDFs in WordPress