Using divi, I have no idea how you would do this. More than likely you’d have to build a custom shortcode for every value you want to display, but that’s just a guess, I do not use divi, but I do know that with most of these page builders it is the only practical way to do something like this.
How long it would take you would depend on the number of statistics you want to do this for.
The first thing you would need it to create an acf/save_post action that will put all of the statistics every time a post is added or updated and store all statistics for all posts in a single array in the options table. This would have to be done to prevent the entire thing from timing out (crashing) the site. Depending on the number of values you are saving this could take 1 to several hours.
The next thing you’d need to do is build a custom shortcode for each statistic. There are plenty of tutorials available on the web for doing this as well. The first one might take you a couple of hours to build, after that you could likely copy and past the first one and then change the name and modify the array indexes used to do the calculations and then test. You’re probably looking at an average an hour per statistic, maybe a little less once you get started depending on how many there are. You might also be able to use a function to do the actual calculation based on arguments and reduce the time taken to build new statistic shortcodes and the amount of code needed. This is what I’d probably do, so you might be looking at 2 hours to build the first one + the function and then 30 minutes or so for each additional shortcode.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
The ACF site is currently experiencing some issues.— Advanced Custom Fields (@wp_acf) September 29, 2022
We apologize for the inconvenience and we are working hard to get it back up and running as soon as possible.
© 2022 Advanced Custom Fields.