Posts Tagged: diarrhea


23
Aug 08

Wordpress Pages and Babysitting Rikuto

What did I do today?

I made a math worksheet about bus timetables, then I spent the rest of the day babysitting Rikuto while his mum was at work. We watched some Olympic volleyball, then played in the street on his little Thomas the Tank Engine train.

Rikuto is suffering from diarrhea at the moment which means after holding him for a while, my arms smell of poo.

What did I learn today?

global $post;
if(is_page() && $post->post_parent) {
     echo "do something";
}

That little conditional works on Wordpress. If you paste it into a page template, you can determine whether or not the page is a parent or child. It’s really saying, “If this is a page and it has a parent, it must be a child so (do something)”.

What did you learn today?