Warning: count(): Parameter must be an array or an object that implements Countable

Hi there! I am having much trouble getting my theme to work! I am using Pinegrow WP edition using LOCAL for localhost and using WPEngine for hosting.

Most everything is working but I can not get the post content to display correctly at all. The front page loop works fine, but I do not understand what is going wrong for the post content.

In Local it shows the error (on staging it suppresses the error and shows no post/page content):

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in C:\Users\Daniel Goldman\Local Sites\nons\app\public\wp-includes\post-template.php on line 310
Call Stack

Time Memory Function Location

1 0.0001 393072 {main}( ) …\index.php : 0
2 0.0001 393272 require( ‘C:\Users\Daniel Goldman\Local Sites\nons\app\public\wp-blog-header.php’ ) …\index.php : 17
3 0.0523 1985664 require_once( ‘C:\Users\Daniel Goldman\Local Sites\nons\app\public\wp-includes\template-loader.php’ ) …\wp-blog-header.php : 19
4 0.0540 2029768 include( ‘C:\Users\Daniel Goldman\Local Sites\nons\app\public\wp-content\themes\wp_nons\single.php’ ) …\template-loader.php : 78
5 0.0684 2162336 the_content( ) …\single.php : 26
6 0.0684 2162336 get_the_content( ) …\post-template.php : 238

Here is the staging link: http://stagingnostone.wpengine.com/

Here is a ZIP of my PINEGROW Files:http://stagingnostone.wpengine.com/wp-content/themes/wp_nons/NONS-WP-DEV.zip

Well color me tickeled. It was just the version of PHP in LOCAL. Works fine on staging site!!! Consider this ticket closed.

BE AWARE:::: PHP version in LOCAL app might not work well for development purposes!!!

1 Like