Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Drop Media from results that have no parent when parent attribution has been enabled in SearchWP.
<?php
// Drop Media from results that have no parent when parent attribution has been enabled in SearchWP.
// @link https://searchwp.com/documentation/hooks/searchwp-source-post-post_type-parent_attribution-strict
add_filter( 'searchwp\source\post\attachment\parent_attribution\strict', '__return_true' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment