if then trouble
-
I’m pulling content from two child pages into a parent page. I have them pulled in menu order. The code I’m using is:
<?php $pages = get_pages('child_of='.$post->ID.'&sort_column=menu_order&sort_order=asc&parent='.$post->ID); $count = 0; foreach($pages as $page) { $content = $page->post_content; if(!$content) continue; if($count >= 2) break; $count++; ?>
but I’d like to wrap that in an if statement that formats any child being pulled in with a menu order greater than 1 a particular way. I’m struggling with that conditional statement. Here’s what I tried (but which didn’t work because I’m making some rookie mistake *grrr*):
<?php if ($post->ID.'&menu_order' > 1) { ?>
what am I doing wrong? I’m sure it’s something simple. Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘if then trouble’ is closed to new replies.