Posts Page
。可以找到以下内容:WP-Admin->Settings->Reading Settings->Front page displays
如何检索在此设置中设置的页面ID?
#1 楼
使用page_for_posts
选项:<?php
$page_for_posts = get_option( 'page_for_posts' );
?>
这将返回分配用于显示博客文章索引的页面的ID。
Posts Page
。可以找到以下内容:WP-Admin->Settings->Reading Settings->Front page displays
page_for_posts
选项:<?php
$page_for_posts = get_option( 'page_for_posts' );
?>