固定ページの子ページかどうか条件分岐
-2016年02月12日-

functions.phpに下記を記述
function is_parent_slug() {
global $post;
if ($post->post_parent) {
$post_data = get_post($post->post_parent);
return $post_data->post_name;
}
}
if (is_page('hoge') || is_parent_slug() === 'hoge') {
// スラッグが hoge ならtrue
}