• First of all great theme! This is definitely one of the best free themes out there and the fact you’re supporting it is even better so thanks.

    I’m having an issue when I use the Popular Posts Widget in Spanish. I’m going the translating theme route via PO files and I get this error:

    Warning: Division by zero in /home/gustavo/public_html/wp-content/themes/justwrite/acosmin/widgets/custom-popular-posts-widget.php on line 49

    Here’s the url: https://gustavopolo.ca/es/

    When the site is in English it works fine though: https://gustavopolo.ca/

    Help with this would be awesome! Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Theme Author acosmin

    (@acosmin)

    Hi! I am not home at the moment and I can’t take a really good look at your problem. Because of the upcoming holidays I will be back in 3-4 days.

    If you can, please disable that plugin until I have an answer to your problem.

    Happy New Year!

    Thread Starter GustavoPolo

    (@gustavopolo)

    Sounds good. Thanks for the response.

    Happy New Year!

    Theme Author acosmin

    (@acosmin)

    Do you have any comments on the blog?
    Is the /es/ version a new WordPress install?

    Thread Starter GustavoPolo

    (@gustavopolo)

    Right now no, but i can add some.

    Edit: I’ve added a comment to the Spanish side of the blog and the error is there. The /es/ is the same install. I’m just using WPML so I only have to manage one blog with blog languages.

    Theme Author acosmin

    (@acosmin)

    Hi! In acosmin/widgets/custom-popular-posts-widget.php find these lines:

    $mcn = get_comments_number();
    $ncn = get_comments_number();

    replace them with:

    $postid = get_the_ID();
    $mcn = get_comments_number( $postid );
    $ncn = get_comments_number( $postid );

    If this doesn’t work there might be some incompatibilities between the two plugins. I will investigate the problem… until then please use another plugin.

    Thread Starter GustavoPolo

    (@gustavopolo)

    Unfortunately that didn’t work.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Popular Posts Widget – Error When Translated To Spanish’ is closed to new replies.