broken theme?

[ad_1]

works on one server doesn’t work on the newer server…

thoughts?

PHP7.4 was giving a snuffleapagaus error on new server.

**Warning**: count(): Parameter must be an array or an object that implements Countable in **/home/DOMAIN/public\_html/wp-content/themes/twogen/templates/carousel-front.php** on line **19**

line 18 and 19:
if ( $slide->post\_status == ‘publish’ ) {
$i = count($slides);

[ad_2]
2 Comments
  1. Is just a warning. You can suppress warnings in your wp-config.php file, and while the function may not work, you won’t have issues with admin access or functionality.

    Your theme isn’t current and needs updates to function on latest php version. 7.4 even is outdated and insecure. Hire a developer to help you out here.

  2. Looks like that count function needs to be wrapped in a condition to check if $slides is an array. Pretty simple fix that should have been coded to do so, initially.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer