Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
// $page is a post where post_type=='page'
if (get_option('show_on_front')=='page') {
$page_id = get_option('page_on_front''page_for_posts');
$page = get_post($page_id);
} else {
$page = false;
}
I think you are looking for this:
// $page is a post where post_type=='page'
if (get_option('show_on_front')=='page') {
$page_id = get_option('page_on_front');
$page = get_post($page_id);
} else {
$page = false;
}
I think you are looking for this:
// $page is a post where post_type=='page'
if (get_option('show_on_front')=='page') {
$page_id = get_option('page_for_posts');
$page = get_post($page_id);
} else {
$page = false;
}
// $page is a post where post_type=='page'
if (get_option('show_on_front')=='page') {
$page_id = get_option('page_on_front');
$page = get_post($page_id);
} else {
$page = false;
}