I have a child theme. Within the child theme, I have a custom page template. It work perfectly on a desktop. It is not working on my iPhone with the Safari browser.
This is the template:
<?php define('WP_USE_THEMES', false); //This code stops the theme files from loading remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' ); while (have_posts()) : the_post(); the_content(); endwhile; //Get post ID - create html element to store it echo "<div id=postID>".get_the_ID()."</div>" ; ?>
Notice how the template does not load the theme files, header or footer. Yet when I open the page on my iPhone, the header and footer are there. In addition to that, all the theme files are loaded. It seems as though the template is being ignored on mobile.
How can I fix this?