如果您试图通过循环只输出特定的页面标题和内容,那么没关系,您只需要帖子或页面的id//这里有两件事您需要了解1。the\\u title()(无需“echo”,此函数针对当前查看帖子或页面的标题更具体);2、获取\\u标题(需要“echo”,此功能可以显示每页中的每篇文章或页面标题);
use
echo get_the_title(120); // 120 is your post or page id, it can show every page
echo get_the_title($post->ID); // for only current page view
echo get_the_title(get_the_ID()); // for only current page view, also in loop
echo get_the_title(get_the_ID(12)) //120 is your post or page id, it can show every page
echo get_the_title(get_the_ID($post->ID));
content
the_content() is only for current page, also in loop, no need echo
echo get_the_content(120); // 120 is your post or page id, it can show every page
echo get_the_content($post->ID); // for only current page view
echo get_the_content(get_the_ID()); // for only current page view, also in loop
echo get_the_content(get_the_ID(12)) //120 is your post or page id, it can show every page
echo get_the_content(get_the_ID($post->ID));