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
2 months
0 Answers
6 views
0
Leave an answer
You must login or register to add a new answer .