diff --git a/msm-sitemap.php b/msm-sitemap.php index c1692dfb..32acaa8c 100644 --- a/msm-sitemap.php +++ b/msm-sitemap.php @@ -507,8 +507,9 @@ public static function generate_sitemap_for_date( $sitemap_date ) { $GLOBALS['post'] = get_post( $post_id ); setup_postdata( $GLOBALS['post'] ); - if ( apply_filters( 'msm_sitemap_skip_post', false ) ) + if ( apply_filters( 'msm_sitemap_skip_post', false, $post_id ) ) { continue; + } $url = $xml->addChild( 'url' ); $url->addChild( 'loc', esc_url( get_permalink() ) );