• Resolved jrothra

    (@jrothra)


    In trying to revamp my website I’m trying various options. I like the grid format for the latest posts on the front page. However, when I said to add the right sidebar on the front page (just to see how it might work), I got these notices around the latest post grid (both next to each grid box):

    Warning: Division by zero in /home/jrothra/public_html/wp-content/themes/customizr/inc/parts/class-content-post_list_grid.php on line 130

    Warning: Division by zero in /home/jrothra/public_html/wp-content/themes/customizr/inc/parts/class-content-post_list_grid.php on line 137

    Since this seems to be inside the core code of the theme, I don’t want to mess with the file. I also didn’t save the site that way (for obvious reasons), though I did take a screen shot.

    Screen shot: https://drive.google.com/file/d/0B4mnNZ1F-EDsU2pzdzhRSkF0dGc/view?usp=sharing

    http://www.johnrothra.com

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author presscustomizr

    (@nikeo)

    Hi John !

    Thanks for reporting this problem.

    I can’t reproduce the issue unfortunately. Can you please try to update to the latest version of the theme v3.3.12 which will be live soon. (download link).

    If you are still getting the same error message, can you please desactivate any custom code added to your functions.php file if any ?
    If it still does not solve the issue, then you’ll want to test without any plugin activated.

    If you still see the problem, then please let me know and we’ll try something else.
    Thanks !

    Thread Starter jrothra

    (@jrothra)

    nikeo,

    I updated to 3.3.12 – only the line number of error changed (see below)

    I removed the child theme’s custom functions.php (just renamed the file so I can just rename it back) – that did it.

    This means something between the core and the child’s function.php file is causing the conflict.

    With the upgrade to 3.3.12, the error now reads these lines:

    Warning: Division by zero in /home/jrothra/public_html/wp-content/themes/customizr/inc/parts/class-content-post_list_grid.php on line 139

    Warning: Division by zero in /home/jrothra/public_html/wp-content/themes/customizr/inc/parts/class-content-post_list_grid.php on line 132

    Here’s my child theme’s function.php code: http://pastebin.com/7FzjvjQE

    Theme Author presscustomizr

    (@nikeo)

    Hi John, thanks for your feedback and attached source code.

    This was due to the custom layout and the fact that the core code did not anticipate enough this particular case.

    Until the next update, you can can fix your issue by adding the following simple snippet to your functions.php.

    add_filter( 'tc_grid_col_layout_map' , function( $_map ) {
      return array_merge( $_map, array( 'span8' => '3' ) );
    });

    Let me know if it helped !

    Thread Starter jrothra

    (@jrothra)

    That did the trick! TY, nikeo! BTW, I’m loving this theme more and more as I discover the various things it can do.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Division by Zero’ is closed to new replies.