if (is_page & children
-
Hi, I’m struggling with something here and wondered if anyone could help. I’ve got a bit of text at the top of each page/category (these are pages, not categories) that changes according to which page you are on. It all works fine, until you get to a grandchild of page 2 – nothing is displayed. I’m not very good at php so I hoped someone could help!
<?php if (is_page(13)) echo "Lorem ipsum dolor sit amet, consectetuer adipiscing elit." ?> <?php if (in_category(12)) echo "Sed lacus. Mauris massa nisi, placerat sed, convallis commodo, imperdiet convallis, ante." ?> <?php if (in_category(13)) echo "Etiam auctor arcu vitae dui. " ?> <?php if (is_page(2) || $post->post_parent=="2") echo "Cras laoreet. Nunc massa. Sed bibendum, nunc in luctus luctus, eros ante placerat pede, et dapibus lectus ante ac velit." ?>
Thanks in advance
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘if (is_page & children’ is closed to new replies.