Display country flags with clickable links

The redirecting “drop-down” (select element) part of your question can be answered by looking at this fiddle that someone made for a different question: https://jsfiddle.net/jalbertbowdenii/2f9wvyqm/ As far as getting the flags to appear in the option elements of the select element, the only way to get it to work cross-browser (that I know of), would … Read more

Update around 200,000 posts

You mentioned setting the memory limits and execution time to unlimited, so this may not be the right answer. I thought I’d mention it anyway since it may help. Since you have so much content, you’ll have to find ways to accomplish this in the background rather than during the request. This is the perfect … Read more

Polylang and template files

One option is to create a single category.php file with conditionals. So, you would have something like this: <?php if(is_category(‘one’) || is_category(‘un’) { // your code here } elseif(is_category(‘two’) || is_category(‘deux’) { // your code here } ?> This way you can still output different code per category, but you won’t have to copy category-one.php … Read more

Filter language in Polylang for custom taxonomy

Nevermind, I finally found. This is not documented, but going through Polylang code I found a way. First retrieve the languages with their taxonomy id with $lang = get_terms(‘term_language’, [‘hide_empty’ => false]) which gives an object that can be called as $lang->name and $lang->term_id. Then, the wp_query should look like this: $args = array( ‘post_type’ … Read more