There is the WP Mobile Detect plugin, you can insert shortcodes through it, and you can also insert them into the topic: wpmd_is_notphone (), wpmd_is_phone () and others.

How to make it so that it defines the topic? According to the principle of such a construction or another:

if( wpmd_is_notphone() ){ Тема A } if( wpmd_is_phone() ){ Тема B } else{ Тема B } 
  • According to the described algorithm, you do not want to determine the theme, but set it dynamically. Nothing will come of it. WordPress can't do that. - KAGG Design
  • Probably you have to glue 2 themes into one and use this design when you type <? Php if (wpmd_is_notphone ()):?> <P> Desctop & tablet </ p> <? Php if (wpmd_is_phone ()):?> <P> Phone </ p> <? Php else:?> <P> Phone </ p> <? Php endif; ?> - Yura
  • one
    In modern topics do not do that. Make adaptive layout and switch styles using @media. In fact, the theme reacts to the width of the screen: up to 767 mobile phones, 768-1024 tablets, above the desktop, possibly with changes of 1200px, etc. - KAGG Design

1 answer 1

How to make it so that it defines the topic?

What would this ancient plugin change the theme - I'm afraid it’s unrealistic .. Well, at least it’s not practical. There are other plugins for this. For example https://wordpress.org/plugins/any-mobile-theme-switcher/screenshots/

  • I tried a bunch of such switch-plugins, but they are horrified as they are not friends with the Super Cash plugin. And this ancient one clearly defines everything, only the list of new models of phones and tablets can be updated; sometimes you need + you can adapt the content of the records. - Yura
  • You need to configure cash-plugs or delete nafik. Or even use a modern, adaptive theme - SeVlad
  • @ Yura, and the W3 Total Cache plugin is also not friendly? Try it, it showed itself perfectly in work - alenkins