如何通过WordPress页面的php查询在HTML页面中包含Yoast meta标签

问题描述

我正在使用以下代码在html页面显示wordpress内容

<?PHP

// Include wordpress

define('WP_USE_THEMES',false);
require('/home/site/public_html/blog/wp-blog-header.PHP');
query_posts('page_id=123');
wp_head();

?>


{PHP} while (have_posts()): the_post(); {/PHP}
{PHP} the_content(); {/PHP}
{PHP} endwhile; {/PHP}

        

wp_head()应该包含来自指定页面的酵母元数据,但不包括。它显示一些未指定的<Meta property="og:title" content="Page not found - Blog" />等的酵母值。 如何从查询中指定的页面获取正确的酵母元数据?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)