Recently, when I view a page in WordPress Preview mode, it always loads the default template (theme index.php file) whereas when I look at the published page, it’s the right template. I have around 10 different templates for my pages. Just keep in mind that I’m not talking about the theme itself, but the WordPress template structure. I included three pictures. The admin panel one, shows different templates for my page.As shown, I chose Fixed-Width Clean Page. The second picture shows the page in Preview mode.As you can see it includes a sidebar which is included in the default template but not the one that I chose. And the last picture is the Live view of the website which is correct. As you can see the sidebar doesn’t exist. I searched all over the internet and did some suggestions, but none of them work (like saving the permalinks again, changing the theme and changing it back again, etc). The only change that I recently made was upgrading to WordPress 4.7.4 and blocking access to admin panel by ip using .htaccess file (I removed the .htaccess file, but still no luck). Any suggestions would be appreciated.
Read more here: WordPress Preview not loading Template