I want to include file from a plugin to templates function file. This is the code i use :
$acf_url = plugins_url('/advanced-custom-fields/acf.php');
include_once($acf_url);
But this code is not working and i'm getting this error :
Warning: include_once(http://localhost/wp-content/plugins/advanced-custom-fields/acf.php): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error in G:\MAMP\htdocs\wp-content\themes\mytheme\functions.php on line 3
Warning: include_once(): Failed opening 'http://localhost/wp-content/plugins/advanced-custom-fields/acf.php' for inclusion (include_path='.;C:\php\pear') in G:\MAMP\htdocs\wp-content\themes\mytheme\functions.php on line 3
So what is the codes problem ?