Navigation überspringen

[Gelöst] Calculation within View

This support ticket is created vor 3 Jahre, 9 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von kelvinL-2 vor 3 Jahre, 9 Monaten.

Author
Artikel
#2152575

Dear Sir/Madam,

I visit https://toolset.com/forums/topic/calculating-from-a-custom-field-and-a-view/ but not what I am looking for, is it possible to do basic Mathematics calculation within the Views.

I have custom fields contain value inside, for example cost, I want to build a View to list out of selected post and sum up the value from the custom field and then display as total on page.

Can Toolset able to do or I have to do with PHP global variables?

Best regards,

Kelvin.

#2152863

Nigel
Unterstützer

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+01:00)

Hi Kelvin

Toolset doesn't include any feature that you can use for calculations, and you'll need to use custom code for that.

How you do that depends on whether you want to add up values from fields belonging to the same post, or you want to calculate a sum across a number of posts.

You might find these couple of code samples helpful (even if they are not specifically the same case):

versteckter Link
versteckter Link

(That site has some code formatting issues, but you can hopefully understand the examples.)

#2159705

My issue is resolved now. Thank you!