Home › Forums › Add-ons › Options Page › how to show custom field option in theme page? › Reply To: how to show custom field option in theme page?
1. register option page
if (function_exists('acf_add_options_page')) {
acf_add_options_page(array(
'page_title' => 'Site Options',
'menu_title' => 'Site Options',
'menu_slug' => 'acf-options',
'position' => '103.3',
'capability' => 'edit_posts',
'redirect' => false,
));
}
2. In WordPress Admin go to “Custom fielsd” menu? create new Field Group and assosiate it with your option page https://gyazo.com/13f3a19a98794439fd2e5b0228180587
3. In template (index.php or category.php) use the_field('field-name', 'options');
to show your custom field
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.