-5

What does the below php line of code mean please?

I am trying to understand how the below code impacts the behaviour of the template-parts/post/content.php file in wordpress.

<?php if ( is_single() && ! empty( $category_array ) && !in_array(2, $category_array ) ) : ?>
Martin Burch
  • 2,486
  • 3
  • 26
  • 55
Matthew
  • 7
  • 2

1 Answers1

3

"If the page we're on is showing a single post, and the post has categories, and none of the categories are category #2..."

ceejayoz
  • 171,474
  • 40
  • 284
  • 355