How to Fix PHP 7.2 “Warning: count()” on the_content()
Looking to fix this “Warning: count(): Parameter must be an array or an object that implements Countable in /wp-includes/post-template.php on line 284” or something along those lines?
I had this issue using Sage and PHP 7.2 it was breaking the_content() so I used this workaround to make it work.
//Get the_content from a post or page
return apply_filters('the_content', get_post_field('post_content', $post->id));
Today I will share something that I use often. Getting the children of the current queried category or taxonomy and making from them …
Wordpress Resources | Snippets | Themes
- How to create simple WordPress Loop for posts and display it in single.php
- How to quickly install Roots Trellis and Bedrock for local development environment on Windows
- What do you need to install on your Windows PC for work with Roots Trellis and Bedrock stack.
- Ctreate a query from a single category slug
- How to add HTML elements to Contact Form 7 (Select Multiple)