Skip to content

Commit

Permalink
Fix: Removing short codes from content
Browse files Browse the repository at this point in the history
  • Loading branch information
Niclas Norin committed Sep 6, 2023
1 parent 31224d1 commit c026f57
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/php/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ public function getTheExcerpt($post, int $numberOfWords = 55) {
$excerpt .= render_block($block) . " " . PHP_EOL;
}
}

$excerpt = preg_replace('/\[(.*?)\]/', '', $excerpt);

return wp_trim_words(
strip_tags($excerpt)
Expand Down

0 comments on commit c026f57

Please sign in to comment.