If static post page is set what is it? is_page?
-
In Options>Reading I have set a static home (home.php) page and a news page (news.php), and wanted to add some conditional coding to my sidebar (if is news page then show categories else show image, which is a random number output ‘rand(3,5)’), but for some reason it is not working? so is it “is_page”, “is_page(‘news’)” or something else? as it is not coming up?
<?php if ( is_page('news') ) : ?> <?php wp_list_categories('show_count=1&title_li='); ?> <?php else : ?> <div id="sideImage_<?php echo $myRandomVariable; ?>"> <!-- Insert Header Image Here --> </div> <?php endif; ?>
Thanks
Carl
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘If static post page is set what is it? is_page?’ is closed to new replies.