translating RSS feed URL
-
The theme I used allways displays the url RSS feed of the default language (eg. https://example.com/feed/). If I switch the language, the url of the RSS feed remains the same – but if I manually type another language in the URL, eg. https://example.com/fr/feed/ the feed apears correctly in french.
How can I translate the url of the rss feed?
The widget that shows the RSS feed button calls $theme->rss_url() and in the Themater.php I have:
function rss_url() { $the_rss_url = $this->display('rss_url') ? $this->get_option('rss_url') : get_bloginfo('rss2_url'); return $the_rss_url; }
later edit:
I guess I can hardcode something like this in the rss_url() function:
if (pll_current_language() == "fr") return "https://example.com/fr/feed/"
but I don’t like this solution.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘translating RSS feed URL’ is closed to new replies.