Support

Account

Home Forums ACF PRO php 8.0 breaks acf pro

Solved

php 8.0 breaks acf pro

  • Current version of acf pro Version 5.12 breaks wordpress site when site is updated to php 8.0. but works with php 7.4. Is there a solution to this problem ?

    PHP Fatal error: Uncaught Error: Call to undefined function get_field() in /nas/wp-content/live/dlymarketing/wp-content/themes/dly/page-home.php:70\nStack trace:\n#0 /nas/wp-content/live/dlymarketing/wp-includes/template-loader.php(106): include()\n#1 /nas/wp-content/live/dlymarketing/wp-blog-header.php(19): require_once(‘/nas/wp-content/li…’)\n#2 /nas/wp-content/live/dlymarketing/index.php(17): require(‘/nas/wp-content/li…’)\n#3 {main}\n thrown in /nas/wp-content/live/dlymarketing/wp-content/themes/dly/page-home.php on line 70

    code:
    <?php $page_color = get_field(‘page_color’); ?>

  • The only reason that you would get an undefined function error for get_field() is if ACF in not installed when the function is called. The change in PHP should not affect the loading of the ACF plugin.

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

You must be logged in to reply to this topic.