Multiple conditional not working
-
I want all of my posts and pages not to be indexed for search engines except the front page, page ID 157 & 161, and post ID 334.
I have come up with the following code but doesn’t seem to be working.<?php if( ! is_front_page( ) || ! is_page( 157,161 ) || ! is_single( '334' ) ) { echo'<meta name="robots" content="noindex, nofollow" /> '; } ?>
The exclusion does not work and it prints the meta tag for all the pages and posts.
Can someone tell me what’s wrong?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Multiple conditional not working’ is closed to new replies.