views:

22

answers:

1

I want to hide this specific in the blog and other page I have this code :

<?php if (is_page(array ('2','4','6','8','10','12'))) : ?>
<?php else : ?>
<?php include('stats.php');?>
<?php endif; ?>

it won't show on 2,6,8,10,12 which are the pagesbut it shoes in 4 which is the blog please help.

A: 

Assuming 'blog' is a category, and it's ID is 4 and you don't want to include 'stats.php' when viewing that category's archive page:

<?php if (!is_page(array('2','4','6','8','10','12')) && !is_category('4')) {
    include('stats.php');
} ?>

Otherwise, refer to the documentation for Wordpress conditional tags.

Richard M
thanks that work since my peramlink isn't working I made it as <?php if (!is_page(array('2','4','6','8','10','12')) } ?>
kwek-kwek