WordPress.org

Ready to get started?Download WordPress

Forums

Mantra
warning division by zero in (2 posts)

  1. pagalmaarl
    Member
    Posted 1 year ago #

    Hello
     
    Here is my problem, being new at this I have no idea what to do. I created my first website using wordpress 4 months ago about it. Until now everything works perfectly, but this morning, can not connect to my site, the pages display the same error message:
     
    Warning: Division by zero in / homez.311/ludotheqt/www/wp-content/themes/mantra/admin/custom-styles.php on line 22
     
    Warning: Division by zero in / homez.311/ludotheqt/www/wp-content/themes/mantra/admin/custom-styles.php on line 23
     
    Here is my custon-styles.php (start and highlighted lines 22 and 23)
    <? php
     
    optset function ($ var, $ val1, val2 $ ='', $ val3 ='', $ val4 ='') {
    $ vals = array ($ val1, $ val2, $ val3, $ val4);
    if (in_array ($ var, $ vals)) return false; else: return true; endif;
    }
     
    mantra_custom_styles function () {
     
    / * This Retrieves admin options. * /
    = $ mantra_options mantra_get_theme_options ();
    foreach ($ mantra_options as $ key => $ value) {
          $ {"$ key"} = esc_attr ($ value);
    }
    if ($ mantra_dimselect == "Absolute") {
    totalWidth $ + $ = $ mantra_sidewidth mantra_sidebar 50;
    $ = $ contentSize mantra_sidewidth;
    $ = $ sidebarSize mantra_sidebar;
    }
    else if ($ mantra_dimselect == "Relative") {
    totalWidth $ + $ = $ mantra_sidewidthRel mantra_sidebarRel;
    $ contentSize = intval (($ mantra_sidewidthRel / $ totalWidth * 100) -2);
    $ sidebarSize = intval (($ mantra_sidebarRel / $ totalWidth * 100) -2);
    }

    ob_start ();>
     
    <style type="text/css">
    <? php
    / *
      * CSS LAYOUT
     
     
    Thank you in advance

  2. the.Zedt
    Member
    Posted 1 year ago #

    Mantra somehow lost its settings (or part of them).

    You'll need reset WordPress to a different theme (by renaming the "mantra" folder to something else) so you can use access the Dasboard, then uninstall and reinstall Mantra to make it reset to the default settings.

    Version 2.0.2 will hopefully prevent this issue from ever happening again.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.