Weird issue with is_pages() with array

Question

Does anybody know why this works:

if ( is_page( array( 'home', 'contact' ) ) ) {}

But this doesn’t:

$pages = array( 'home', 'contact' );
    if ( is_page( $pages ) ) {}

Even when adding settype( $pages, 'array');

0
birdseyedesign 8 months 2020-11-27T04:10:20-05:00 0 Answers 6 views 0

Leave an answer

Browse
Browse