2

how do i go about doing it?

there is one solution that i thought would work.. my theme allows me to turn of responsive design.. i copied the whole theme folder and renamed it to theme-mobile.. so now i have 2 exact same themes but with different names..i go in theme settings and turn of responsive design on one of the themes.. then i tried to use this plugin to switch theme when someone is using mobile device

but the problem is even if i have two themes they share the settings..if i turn off responsiveness on one theme..the other one gets turned off too.. any help would be really appreciated..

4

2 回答 2

0

这是一个插件,可以让你走到一半。 http://wordpress.org/plugins/responsive-opt-out/

它在前端完成所有操作,因此您可以使用 css 完成所有操作。

于 2014-01-02T22:28:33.347 回答
0

有一个使用 JQuery 的 javascript 修复程序。

这是一些伪代码

LINK.onclick .find "<meta name="viewport" content="width=device-width">" .replace ""

本质上,您的 javascript 将侦听鼠标单击您的视图桌面链接的事件,它将在 DOM 中搜索一些 html,这些 html 应该类似于使网站在移动设备上响应的内容(您仍然需要样式表)那一点 html 它将用空白字符串替换它,因此该站点不再具有移动响应能力。(当您缩放它们时,它仍然会在桌面浏览器中显示为响应式)

于 2014-04-27T16:36:23.753 回答