[Plugin: Polylang] How to insert flags into menu in custom positions
-
Hey there,
great plugin! I’d like to ask if there is any way to insert flags into menu manually e.g.
Home
About us
Languages –(dropdown)–> en_EN, es_ES
Some other element
Another one
fr_FR
ContactI think it could be done by using some kind of shortcode in menu element’s name attribute.
Name: [polylang=”es_ES”]
In that case you need to use wordpress filter ‘wp_nav_menu_items’ and replace those codes into proper links using preg_replace().
I can try to prepare proper patch but firstly let me know what do you think about that :).
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘[Plugin: Polylang] How to insert flags into menu in custom positions’ is closed to new replies.