BTW, in the following post you explained how to include specific categories, while all the others will be excluded from AMP. I just want to exclude one, while keeping all the same 🙂
https://wordpress.org/support/topic/anyway-to-exclude-specific-categories-from-amp/
Thanks again,
Ben
-
This reply was modified 6 years, 11 months ago by
benyoffe.
I’m not sure what you mean by paragraph, but to exclude all posts from a given category you can just invert the condition from the above topic:
add_filter( 'amp_skip_post', function( $skip, $post ) {
if ( has_category( 'non-amp', $post ) ) {
$skip = true;
}
return $skip;
}, 10, 2 );
Thanks for the catch. I meant category 🙂