0

I am getting this error on this page: http://3a8.c8c.myftpupload.com/category/portfolio/

This is the error: Warning: Division by zero in /home/content/p3nexnas05_data01/98/2124598/html/wp-content/plugins/genesis-grid-loop/plugin.php on line 251

The page is displaying the way I want it to, but the warning is appearing at the bottom of the page.

Line 251 of the plugin mentioned in the warning looks like this:

$max = ceil ( ( $wp_query->found_posts - $grid_args['features_on_front'] - $grid_args['teasers_on_front'] ) / ( $grid_args['features_inside'] + $grid_args['teasers_inside'] ) ) + 1;
    $wp_query->max_num_pages = $max;

I have the theme set to display 12 posts. I am using the Genesis Studiopress Modern Portfolio Pro child theme.

Can anyone help me? I have put in a support note with the plugin developer here: http://wordpress.org/support/plugin/genesis-grid-loop But haven't heard anything yet. Appreciate your help! Thanks!

user2255059
  • 31
  • 1
  • 5

1 Answers1

0

The warning message just says ( $grid_args['features_inside'] + $grid_args['teasers_inside'] ) part of your code is returning as a zero in value

so ANYTHING / 0 will cause an issue is what wordpress is warning you about.

as a fix to this if you do not want to touch the code then try changing teasers_inside or features_inside post amounts (whatever that means in your backend) and increase it

if you want to touch the code portion

add this code in the wp-settings.php file to disable wordpress warning message outputs

//Add define('WP_DEBUG',true);
if (defined('WP_DEBUG') and WP_DEBUG == true){
     error_reporting(E_ALL);
} else {
     error_reporting(0);
}
vico
  • 2,152
  • 2
  • 17
  • 38
  • Oops! No, it didnt, actually. I added the code to the wp-settings.php file and now all of my pages say "Not Found"... – user2255059 Jun 22 '14 at 01:50