Create options pages in WordPress with Advanced Custom Fields (ACF)

Published: 29, Oct 2014
PHPWordPress

I searched low and high to figure out how to create options pages in the updated version of Advanced Custom Fields (version 5 of ACF)

 

if(function_exists("acf_add_options_page")) {
	acf_add_options_page();
}
if(function_exists("register_options_page")) {
	register_options_page('Various');
	register_options_page('Header');
	register_options_page('Footer');
}

After creating the fields in your WordPress backend, to invoke the fields you can use syntax similar to the following:

<?php the_field('my_field','option'); ?>