Skip to content

Instantly share code, notes, and snippets.

@wp-seopress
Created January 30, 2024 16:32
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/87028df9ceb86d039e7c299b8a57b95b to your computer and use it in GitHub Desktop.
Save wp-seopress/87028df9ceb86d039e7c299b8a57b95b to your computer and use it in GitHub Desktop.
Filter export 404 errors query
add_filter('seopress_export_404_query', 'sp_export_404_query');
function sp_export_404_query($args) {
$args = [
'post_type' => 'seopress_404',
'posts_per_page' => '-1',
'meta_query' => [
[
'key' => '_seopress_redirections_type',
'compare' => 'NOT EXISTS',
],
],
];
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment