admin管理员组文章数量:1287489
I use ACF to customize taxonomy term archives pages which are in fact Team member pages. Pages are translated with the help of Polylang.
Problem is : If the member has no related posts, I can access directly the member page, but the translated page is not linked to the language switcher menu. Instead it has been replaced with a link to translated homepage.
I found that this is common behaviour in Polylang. It is programmed to never show translated pages with no posts.
After some research, if found this filter that might be helping. It has been added a while ago but there is no sign of it in the Polylang documentation.
Anybody knows how to use is ?
Thanks
I use ACF to customize taxonomy term archives pages which are in fact Team member pages. Pages are translated with the help of Polylang.
Problem is : If the member has no related posts, I can access directly the member page, but the translated page is not linked to the language switcher menu. Instead it has been replaced with a link to translated homepage.
I found that this is common behaviour in Polylang. It is programmed to never show translated pages with no posts.
After some research, if found this filter that might be helping. It has been added a while ago but there is no sign of it in the Polylang documentation.
Anybody knows how to use is ?
Thanks
Share Improve this question asked Oct 23, 2021 at 11:59 Guillaume GautierGuillaume Gautier 1212 bronze badges1 Answer
Reset to default 2Solution given by filter author :
add_filter( 'pll_hide_archive_translation_url', '__return_false' );
本文标签: PolylangDisplay term archive even if no posts
版权声明:本文标题:Polylang : Display term archive even if no posts 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741253482a2366228.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论