Home › Forums › General Issues › How to insert a field on a CPT "homepage" › Reply To: How to insert a field on a CPT "homepage"
Yeah now its clear 🙂
Open your functions.php file and add this code if options page is not visible in WP menu
// register options page
if(function_exists('acf_add_options_page')) {
acf_add_options_page();
}
When create field group with field f.e.’portfolio_background’
When choose field group location -> Show this field group if [OPTIONS PAGE] is equal to [OPTIONS].
Inside archive-projects.php add
<?php the_field('portfolio_background', 'options');?>
That would be the way how to echo some field and control it if you don’t have page in WP menu.
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.