WordPress.org

Support

Support » Plugins and Hacks » Hacks » Addition of Numbers in Post

Addition of Numbers in Post

  • I am using the “Custom Field Template” version 1.8.3 to create custom fields in posts. The output of these custom fields is going to the (Single Post) single.php file where I am trying to add two numbers together (addition). Is this something that can be done or am I wasting my time? Here is my formula (which doesn’t return the correct results) but I thought I should show you where I am.

    Total of one and two: <?php getCustomField(‘Amount1’) + getCustomField(‘Amount2); ?>

    This formula returns this:

    Total of one and two: 56

    How can I get this to total 5+6 to equal 11?
    Thanks for any help you can offer.

  • The topic ‘Addition of Numbers in Post’ is closed to new replies.