WordPress.org

Ready to get started?Download WordPress

Forums

Addition of Numbers in Post (1 post)

  1. oilboy
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.