Home Forums General Issues Shortcode JSON


Shortcode JSON

  • Hi,

    I am testing a site on localhost with about 4000 posts, each of contains about 200 text-based custom fields, all of which I shown on the page using the [acf field="name"] shortcode. I use the fields to register statistical data that I show on the pages using graphs and tables (hence the large number of fields and shortcode uses).

    To make sure that the site remains fast, I am using the Local JSON feature of ACF. However, I wonder if this JSON will also work with shortcode uses.

    I have not tried the site on live, and if I’m doing something that negatively affects performance, I would rather change the way I do it before going live.

    Therefore, I would very much appreciate it if you confirm whether the JSON will also eliminate server calls for shortcodes (and generally do you think I am going to slow down the site with all the shortcodes and fields?)


  • Local JSON files increase the speed of your site by loading field groups and field definitions from the file instead of making database query.

    The local JSON files will not effect the displaying of the content of those fields that is saved to a post whether they are shown with shortcodes or using functions like get_field() or the_field() in PHP code. The same number of db queries will be done in either case. The only difference is that there are a couple of extra layers of PHP processing that needs to be done. The extra PHP code/function calls should not create a noticeable difference in performance. I can’t give you any testing data, but it would probably takes many thousands of shortcode calls to effect the load time of a single page.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Shortcode JSON’ is closed to new replies.