Blank Archives After Deactivating Jetpack

One of the latest features I’ve added to my Techozoic theme was infinite scroll support for the Jetpack plugin.  It’s a great feature and fairly easy to integrate.  One snag I ran into was after testing with Jetpack enabled and releasing the update I had numerous reports of the archive pages being blank.  This was a stumper because I hadn’t changed anything with the archive pages, and the archives worked perfectly fine on my test site with Jetpack enabled.  I finally figured it out installing the theme on another site, and seeing the problem first hand. 

The root of the problem is the way the infinite scroll uses the get_template_part function.  One of the steps to enable infinite scroll support is to make sure that the template part is named content-(post-format).php.  I had a different naming convention before implementing this feature and this was the whole problem,  I had forgotten to change the get_template_part function on the archive page, so it was calling a nonexistent template file.  The infinite scroll module during the ajax request calls the template part using the content-(post-format) name which is way it would work with Jetpack activated. 

About Jeremy Clark

Small town IT worker with interests in all things technological and technical. Biggest interests are in web development especially the WordPress publishing platform and the community supporting it. Currently developing and maintain the free WordPress theme Techozoic. I'm also always available for hire.
This entry was posted in Aside, Development, wordpress and tagged , , , . Bookmark the permalink.

Leave a reply

Comments will be sent to the moderation queue.