KrisChase.com

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

Posted in Web Development on 06.10.2015 by @chasebadkids

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'); ?>

 

Menu