-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,726
  • 4
  • 31
  • 59
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
  • 176,543
  • 40
  • 303
  • 368