Array Not excluding categories
-
I have this included in the header of every page just before the closing </head>
<?php
if (is_front_page()) { include(“empty.php”); }
elseif (is_home()) { include(“empty.php”); }
elseif (is_page( array(‘691’, ‘32003’, ‘26160’, ‘35582’, ‘34751’, ‘34351’, ‘32510’, ‘32275’, ’28’, ’34’, ‘295’, ‘671’, ‘674’, ‘686’, ‘847’, ‘857’, ‘2527’, ‘1890’, ‘2056’, ‘6588’, ‘12912’, ‘668’, ‘259’, ‘2013’, ‘833’, ‘853’, ‘850’, ‘2072’, ‘2064’, ‘2077’, ‘2052’))) { include(“empty.php”); }
elseif (is_single( array(‘480’, ‘36094’))) { include(“empty.php”); }
elseif (is_category( array(’42’, ’26’, ‘marketplace’, ‘Obituaries’, ‘obituaries’))) { include(“empty.php”); }
else { include(“paywall.php”); }
?>It is not working when folks are looking at individual posts under category 26 obituaries.
Permanlink format is custom: /%post_id%/%postname%/
Is it because it doesn’t know that the page contains that category yet?
– Jim
The topic ‘Array Not excluding categories’ is closed to new replies.