Skip to content

Commit d0c6ad1

Browse files
authored
feat: supress carousel block from feeds (#2263)
1 parent 12a4eaf commit d0c6ad1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/blocks/carousel/view.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
* @return string Returns the post content with latest posts added.
1414
*/
1515
function newspack_blocks_render_block_carousel( $attributes ) {
16+
17+
// Don't output the block inside RSS feeds.
18+
if ( is_feed() ) {
19+
return;
20+
}
21+
1622
static $newspack_blocks_carousel_id = 0;
1723
global $newspack_blocks_post_id;
1824

0 commit comments

Comments
 (0)