Adding condition 'all subpages of '
-
Hi,
i want to use a different css fo all subpages of the page games for example<?php if ( is_page(wp_list_pages('title_li=&child_of='.$post->ID) ) ) { ?> <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/hidepostcontainer.css" type="text/css" media="screen" /> <?php } else { ?> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" /> <?php } ?>i think i got to replace the ” _of=’.$post->ID ” in the list_page function but i don’t get it to work, i also tried:
<?php if ( is_page(wp_list_pages('title_li=&child_of='.$post->ID) and is_category('games') ) ) { ?>if i write the id’s by hand in the is_page(”) function everything works fine, if i don’t replace the &child_of=’.$post->ID it just does it for every page like it should
thanks in advance!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Adding condition 'all subpages of '’ is closed to new replies.