In terms of layout or content? Layout is easy, because it’s mainly CSS. Content is hard; most caching plugins will break your ability to get device info.
if content, see https://wordpress.org/plugins/wonderplugin-conditional-display/
Thanks for your answer @sterndata.
I took a look at the plugin but since I am using elementor I can’t wrap parts of my code with the shortcode.
Then I came across wp_is_mobile function.
Since I only need to serve different content in a few different pages I think I might be able to get around it by combining template_redirect and wp_is_mobile like so:
add_action( 'template_redirect', 'mobile_redirect' );
function mobile_redirect()
{
if (wp_is_mobile())
{
if ( is_singular( 'teachers' ))
{
// how to redirect using a different elementor template ?
}
}
}
Does this make sense?
-
This reply was modified 5 years, 7 months ago by
pablomon.
For elementor specific questions, I recommend asking at https://wordpress.org/support/plugin/elementor/#new-post so the plugin’s developers and support community can help you with this.
Ok. For anyone following this thread I made a similar question in the adequate forum as Steven sugested. Here is the link