[wordpress]親ページのタイトル取得
echo get_the_title($post->post_parent);
$parent_id = $post->post_parent;
if ($parent_id) {
echo get_the_title($parent_id);
}
サイドバーでも使える
続きを読む">
WEB関連(主にコーディング、たまにデザイン)の備忘録。趣味も入ったり。
echo get_the_title($post->post_parent);
$parent_id = $post->post_parent;
if ($parent_id) {
echo get_the_title($parent_id);
}
サイドバーでも使える