0

Recently, when I view a page in Wordpress Preview mode, it always loads the default template (theme page.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.Templates for pageAs shown, I chose Fixed-Width Clean Page. The second picture shows the page in Preview mode.Preview modeAs 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.Live mode 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.

1 Answer 1

0

OK, after some time I figured out what the problem was. The "WP Subtitle" plugin version 2.9, breaks the preview functionality if you have multiple templates. I report the issue to them as well, but posted the answer if somebody came across the same problem. In order to fix the issue temporarily, i commented out the below line (line 74) on the plugin's main file (wp-subtitle.php):

//add_filter( 'the_preview', array( 'WPSubtitle', 'the_preview' ), 10, 2 );
1
  • just so everybody knows, they've fixed it on version 2.9.1
    – MIIB
    Jun 6, 2017 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.