Skip to main contentSkip to footer

For some reason setting the post_type query variable to page doesn’t have the desired effect. Other post types (post, custom post types) work, but page doesn’t do anything.

This is not a Relevanssi bug, but a WordPress feature (see this trac ticket). If the user inputs a bad value to the post_type query variable, WordPress changes it to any. For some reason that happens also when the post_type is set to page, even though that should be a valid value.

There’s nothing Relevanssi can do about this. However, there’s a fix. Relevanssi introduces a new query variable post_types, which happily accepts page. Use that, if you need to filter by post type.

(Update 19.1.2021: This WordPress bug still isn’t fixed!)

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

Ultimate FAQs
Ultimate FAQs is a FAQ plugin that can create FAQs. It has a search, and enabling Relevanssi may break that…
Voice Search

…page under the “Searching” tab. There are three main controls for this feature: Voice search: Toggles the microphone icon on or off for all search forms on your site. Voice search autosubmit: If enabled, Relevanssi will automatically trigger the search once the user stops talking. If disabled, the text will…

Indexing embedded PDFs for the parent post

…) { $block[‘innerContent’] = array( get_post_meta( $block[‘attrs’][‘pdfID’], ‘_relevanssi_pdf_content’, true ) ); } return $block; } Wonderplugin PDF Embed Wonderplugin PDF Embed uses a similar method; the URL of the attachment is in the attribute src. add_filter( ‘relevanssi_content_to_index’, ‘rlv_wonderpdf_content’, 10, 2 ); function rlv_wonderpdf_content( $content, $post ) { $m = preg_match_all(……WordPress. Thus, Relevanssi won’t know the PDF is embedded in the post and cannot index the PDF contents for the parent post. Most of these plugins use shortcodes to embed the PDF viewer on a page. To get Relevanssi to index the embedded PDF contents for the parent post, you……need to establish a connection between the PDF and the post, based on the URL in the shortcode. The same code works with different PDF embedders; you only have to adjust the regex to match the shortcode used by the plugin. WordPress Core File block If you use the default…

Related Posts:

Comment Section:

Leave a Reply

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

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed