Polylang : Display term archive even if no posts

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

Topic plugin-polylang custom-post-type-archives terms Wordpress

Category Web


Solution given by filter author :

add_filter( 'pll_hide_archive_translation_url', '__return_false' );

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.