…} } return $block; } ); PDF.js Viewer Shortcode PDF.js Viewer Shortcode uses a shortcode with the file name in the url parameter. add_filter( ‘relevanssi_content_to_index’, ‘rlv_pdfjs_content’, 10, 2 ); function rlv_pdfjs_content( $content, $post ) { $m = preg_match_all( ‘/\[pdfjs-viewer url=[“\’](.*?)[“\’]/’, $post->post_content, $matches ); if ( $m ) { global $wpdb;……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……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…