Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Polylang 来管理我的 Wordpress 实现中的语言。我的默认语言是法语,当我在翻译页面上时,我想从法语的原始页面中找到页面 ID。
我查看了文档,但看起来不可能检索默认语言(或当前页面以外的任何其他语言)的帖子 ID。
你知道这样做的可能性吗?
谢谢洛朗
我找到了解决方案,代码如下:
$original_page_id= pll_get_post($current_page_id, $default_language);
此代码将返回所选语言的页面 ID ($default_language)