WP - Advanced Custom Fields : acf_add_options_page() does not exist
<p>I am trying to set up <strong>Options Page</strong> with <strong>Advanced Custom Fields</strong> in WP.</p>

<p>What I have in <code>functions.php</code> file :</p>

<pre><code>if( function_exists('acf_add_options_page') ) {

acf_add_options_page();

acf_add_options_sub_page('General');
acf_add_options_sub_page('Header');
acf_add_options_sub_page('Footer');

}
</code></pre>

<p>The problem is that <code>function_exists('acf_add_options_page')</code> returns <code>false</code>.</p>

<p>Seems like that function does not exist, however I am using the latest version of ACF.</p>

<p><br></p>

<p><strong>When I try to use <code>acf_add_options_page();</code>:</strong></p>

<p>I get the following <code>Uncaught Error: Call to undefined function acf_add_options_page()</code></p>

<p><br></p>

<p><strong>When I avoid using <code>acf_add_options_page();</code>, using only <code>acf_add_options_sub_page()</code>:</strong></p>

<p>I get the following Warning(s)</p>

<pre><code>Warning: Illegal string offset 'slug' in C:\xampp\htdocs\wp-content\plugins\acf-options-page\acf-options-page.php on line 230

Warning: Illegal string offset 'title' in C:\xampp\htdocs\wp-content\plugins\acf-options-page\acf-options-page.php on line 230
</code></pre>

<p><br><br></p>

<p><strong>p.s.</strong> I am using an <strong>hook</strong> (tried with <em>init</em>, <strong>plugins_loaded</strong> and <em>admin_init</em>) on <code>functions.php</code> to load the functions :</p>

<pre><code>add_action('init', 'my_init_function');

    function my_init_function() {

    if( function_exists('acf_add_options_page') ) {

        acf_add_options_page();

        acf_add_options_sub_page('General');
        acf_add_options_sub_page('Header');
        acf_add_options_sub_page('Footer');


    }

    }
</code></pre>