Hi guys,
I’ve been sent a code snippet from RankMath but unfortunately it errors. I tried adding extra } but this didn’t help. I’ve also written to RankMath but their response rate/time is not all that good, which means I will be sitting twiddling my thumbs till Monday trying to work it out. I wondered if would please be so kind as to cast your expert eye (or eyes ;)) over the code to see what syntax is not right?
add_filter( 'rank_math/sitemap/exclude_post_type', function( $exclude, $type ){
if ( $type === 'ec-product' ) {
return false;
}
return $exclude
}
These are the errors:
https://www.dropbox.com/s/8r55fgivt99xmwk/snippet-errors.jpg?dl=0
Thank you very much for your help as always.
Michael.