Choose a different elementor page dinamically
-
Hi,
We want to serve different pages for mobile and desktop ( rather than hidding/showing content ). In particular I need to do this for a “single”.
Is there a way to create 2 singles and then choose one depending on the device the user is browsing with?My current approach is sth like this:
add_filter( 'template_include', 'mobile_templates', 99 ); function mobile_templates( $template ) { if (!wp_is_mobile()) return; if ( is_singular( 'teachers' )) { $mobile_template = locate_template( "path to template" ); return $mobile_template; } return $template; }
But I am not sure where Elementor stores the pages and how to access them.
Is there a better way to do it?
Thanks
- The topic ‘Choose a different elementor page dinamically’ is closed to new replies.