Continue reading Download Monitor: Index PDF content for parent page

Download Monitor: Index PDF content for parent page

Relevanssi can handle Download Monitor files without significant problems. If you want to use the “Index PDF contents for the parent page” option, there’s a problem, though. Download Monitor comes in between: the PDF post is attached to the Download Monitor dlm_download post and not the page where the [download]……where the PDF content is added. * * @return string The modified MySQL query. */ function rlv_download_monitor( string $query, int $post_id ) : string { $meta_field_value = get_post_meta( $post_id, ‘download’, true ); if ( $meta_field_value ) { // The [download id=”1234″] shortcode format has one digit in it, so let’s……the method is slightly different: add_filter( ‘relevanssi_pdf_for_parent_query’, ‘rlv_download_monitor’, 10, 2 ); /** * Modifies the attachment content query. * * @param string $query The MySQL query for fetching the attachment content. * @param int $post_id The post ID of the post where the PDF content is added. * * @return…

Read more Download Monitor: Index PDF content for parent page 3 Comments on Download Monitor: Index PDF content for parent page