Custom RSS Feed for default WPML language
-
Hi, I have WPML installed with two languages:
English (default) – mydomain.com
French – mydomain.com/frThis means the RSS feeds are:
mydomain.com/feed/ – includes English and French posts
mydomain.com/fr/feed/ – created by WPML plugin, only shows posts with the French languageThe issue is that in order to separate my mailchimp campaigns by language, I need a feed which only has the English posts. The main feed will include both English and French. I know I could configure WPML to place the default language in a directory as well (mydomain.com/en) and this would solve this issue, but in my case I do not want the default language in a directory, only alternate languages.
Does anyone know how I can either:
A) Alter the main feed so that it EXCLUDES French posts
B) Create a custom RSS feed which only displays English posts
C) Some other way to accomplish this (ideally without a plugin)I did find some articles on creating custom RSS feeds, but I’m not sure how to include a filter in the template that only displays English posts in the feed.
https://www.wpbeginner.com/wp-tutorials/how-to-create-custom-rss-feeds-in-wordpress/
https://www.wpmayor.com/how-to-create-custom-rss-feeds-wordpress/Does anyone know how to do this? Thanks in advance for any suggestions!
- The topic ‘Custom RSS Feed for default WPML language’ is closed to new replies.