문제

Is there any way to get my page title via my template, for example a line like this;

get page_title()

within my template, that would extract the title of that page as defined on each page in the dashboard?

도움이 되었습니까?

해결책

Use following one to get page title :

<?php the_title();?>

For POST

$page_title = $wp_query->post->post_title;

Check for reference: http://codex.wordpress.org/Function_Reference/WP_Query#Properties.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top