Support » Fixing WordPress » How can i add my own formulas to my site?

  • I have some formulas i’d like to add within a calculator widget or page to my site. Some of this are “one rep max calc”, “body mass index calc”, “lean body mass calc”. I understand there are a couple plugins that can do the “body mass index” calculation, but those are useless to me since my site is for bodybuilders and the calc use a couple more options, not only height, weight and sex.

    How can i do this? Is there anyway i can convert an excel sheet into a calculator for wordpress or something like that, or any other way?
    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Ther’s a couple of ways of doing this, but it’s going to depend on how the calculators are set up now and if you want to kepe working with them the way they are.

    The way that I’d do it is to set up the form to calculate using JavaScript – but this is something that you’ll have to work out for yourself depending on exactly what fields you want and how the are going to work in each each other to get the result that you want.

    Its some simple calculations (multiplications etc) but it involves more variables than the one ive found in plugins. Is there anyway i can do it myself, i know nothing about programation but im more than willing to learn how to do this specific thing.

    Is there any manual or guide that’d help me set up my own calculator?

    I don’t know of any manuals around, but it’s not that hard.

    First thing you need to do is decide if you’re going to do the calculations through JavaScript of PHP. If you’re not going to be storing anything I’d recommend JavaScript because it’s all done client-side.

    When you dicide on which way to go, you’ll need to look at learning the basics of that language. Thanks to WordPress uisng jQuery I’d also say to look at that as well because it will really simplify your life when you’re getting the values from the fields.

    I dont need to store the results, i just want the calc so my users can take advantage of it. So ill go look into the basic of javascript i guess. Should i try to find a manual that’s only focused on math stuff so i can make the calc?

    And as i said, i know nothing about programming but im willing to learn.

    Thank you btw!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How can i add my own formulas to my site?’ is closed to new replies.