Skip to content

Instantly share code, notes, and snippets.

@searchwpgists
Created June 20, 2022 11:09
Show Gist options
  • Save searchwpgists/605a2e3b31741a84afaf990893347176 to your computer and use it in GitHub Desktop.
Save searchwpgists/605a2e3b31741a84afaf990893347176 to your computer and use it in GitHub Desktop.
<?php
// Tell SearchWP to drop Media with no parent when Parent Attribution has been enabled.
// This was the default behavior in SearchWP 3 but has changed in SearchWP 4.
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