J
So, logic is quite simple, for example, a standard WordPress-- wp_is_mobile()♪ If a larger list of devices is needed, add to the role of the topic that a filter is used that will expand the range of agents.
Example of use:
if(wp_is_mobile()){
/* Выполни все, что нужно для мобильных, например подгрузку другой страницы темплейта или редирект */
}
For example, for mobile feeding another part of the subject, you have two parts of the top of the topic, for-pc.php and for-mobile.php♪ In the right place of the code:(wp_is_mobile()) ? get_template_part('for-mobile') : get_template_part('for-pc'); The code will use the mobile temple. for-mobile.php If it is injected that the flatterer has entered the mobile device, in all other cases the pP strap shall be loaded for-pc.php♪