Skip to content

Instantly share code, notes, and snippets.

@wp-seopress
Last active March 16, 2021 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wp-seopress/d3681157c849effe086da2b3eba8bee1 to your computer and use it in GitHub Desktop.
Save wp-seopress/d3681157c849effe086da2b3eba8bee1 to your computer and use it in GitHub Desktop.
Filter export redirections query
function sp_export_redirections_query($args) {
//default arguments
$args = [
'post_type' => 'seopress_404',
'posts_per_page' => '-1',
'meta_query' => [
[
'key' => '_seopress_redirections_type',
'value' => ['301', '302', '307', '410', '451'],
'compare' => 'IN',
],
],
];
return $args;
}
add_filter('seopress_export_redirections_query', 'sp_export_redirections_query');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment