Note: You are viewing the documentation for Version 3View Version 4 Docs


View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

Available since: 2.8


View Parameters »

Note: Use of this hook will require a manual reindex

This action receives any PDF metadata that’s been extracted by SearchWP, allowing to do with it what you wish.

add_action( 'searchwp_index_pdf_metadata', function( $pdf_metadata, $post_id ) {
// Perform additional processing of $pdf_metadata
}, 10, 2 );
view raw functions.php hosted with ❤ by GitHub


Parameter Type Description
$pdf_metadta Array

Keys and values will vary for each PDF

$post_id Integer

The post ID of the PDF from which the metadata was extracted

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP