M
M
Mesuti2021-08-26 23:27:23
WordPress
Mesuti, 2021-08-26 23:27:23

How to display data in hidden fields using Advanced Custom Fields without editing the template and use them for calculations?

In wordpress posts, you need to calculate the price.
Using Advanced Custom Fields, I specify the price and quantity values.
How to use these values ​​on the front without editing php in the template?
I tried to output through a shortcode, but the shortcode itself is written in value
<input type="text" value=[acf field="price"]>
6127f912278dc179631702.png

Or collect data in json, but so far I only came up with scatter all the necessary values ​​​​in input hidden

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladik Bubin, 2021-08-26
@ikoit

The shortcode only works for plain text values. From which the conclusion is that other data can be added only through the the_field () function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question