Skip to content

Commit

Permalink
Update content.php
Browse files Browse the repository at this point in the history
Check if either `in_the_loop` or `is_main_query` is not true and exit
  • Loading branch information
ajaydsouza committed Feb 24, 2023
1 parent 4aceb9f commit 2a60f30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function crp_content_filter( $content ) {
global $post, $crp_settings;

// Return if it's not in the loop or in the main query.
if ( ! in_the_loop() && ! is_main_query() ) {
if ( ! in_the_loop() || ! is_main_query() ) {
return $content;
}

Expand Down

0 comments on commit 2a60f30

Please sign in to comment.