admin管理员组文章数量:1405516
I need to show a popup where the user can choose the language and which section to open (partners, customers, support) and that this choice is kept in the cookies so that the next time he returns that section and the selected language are opened directly, but I don't know how to do this, any ideas? (create the popup if I know how to do it but not how to add this selection and save it)
- Add Language switch in the popup (modal).
- Whatever language selection user made should be stored in Cookie and next time he/she opens, site should open in that specific language saved in it.
I need to show a popup where the user can choose the language and which section to open (partners, customers, support) and that this choice is kept in the cookies so that the next time he returns that section and the selected language are opened directly, but I don't know how to do this, any ideas? (create the popup if I know how to do it but not how to add this selection and save it)
- Add Language switch in the popup (modal).
- Whatever language selection user made should be stored in Cookie and next time he/she opens, site should open in that specific language saved in it.
1 Answer
Reset to default 0First of all you need to create a modal pop up with these parameters. after that you can use cookie js.
<script type="text/javascript" src="https://cdn.jsdelivr/npm/[email protected]/src/js.cookie.min.js"></script>
Remember that you need to include jquery before loading this js. For further details you can refer to https://github/js-cookie/js-cookie
After including above js and Jquery in your code. You can directly use Cookies.set('foo', 'bar')
to set a cookie with name foo
and can access it by Cookies.get('foo')
Now it depends on you how you use it in your program.
本文标签: pluginsPopup Cookie Wordpress select language and section (Elementor)
版权声明:本文标题:plugins - Popup Cookie Wordpress select language and section (Elementor) 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744897285a2631139.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论