{"id":49,"date":"2026-05-11T14:32:02","date_gmt":"2026-05-11T13:32:02","guid":{"rendered":"https:\/\/garethhardy.com\/blog\/?p=49"},"modified":"2026-05-11T15:26:12","modified_gmt":"2026-05-11T14:26:12","slug":"how-to-display-acf-option-page-fields-in-wordpress","status":"publish","type":"post","link":"https:\/\/garethhardy.com\/blog\/how-to-display-acf-option-page-fields-in-wordpress\/","title":{"rendered":"How to Display ACF Option Page Fields in WordPress"},"content":{"rendered":"<p>If you\u2019re using Advanced Custom Fields in WordPress, the Options Page is one of the most useful features available. It allows you to create global fields that can be used across your entire website rather than being tied to individual posts or pages.<\/p>\n<p>This is perfect for content such as:<\/p>\n<ul>\n<li>Phone numbers<\/li>\n<li>Email addresses<\/li>\n<li>Social media links<\/li>\n<li>Logos<\/li>\n<li>Footer content<\/li>\n<li>Announcement bars<\/li>\n<li>Global settings<\/li>\n<\/ul>\n<p>In this tutorial, I\u2019ll show you how to:<\/p>\n<ol>\n<li><a href=\"#enable-options-page\">Enable the ACF Options Page<\/a><\/li>\n<li><a href=\"#create-fields\">Create fields in the WordPress admin<\/a><\/li>\n<li><a href=\"#add-content\">Add content to those fields<\/a><\/li>\n<li><a href=\"#display-fields\">Display the fields within your WordPress theme<\/a><\/li>\n<\/ol>\n<hr \/>\n<h2 id=\"enable-options-page\">Step 1: Enable the ACF Options Page<\/h2>\n<p>Before you can use an options page, you\u2019ll first need to <a href=\"https:\/\/garethhardy.com\/blog\/activating-the-options-page-in-advanced-custom-fields\/\">activate it within your theme<\/a>.<\/p>\n<p>Add the following code to your <code>functions.php<\/code> file:<\/p>\n<pre><code class=\"language-php\">\r\nif( function_exists('acf_add_options_page') ) {\r\n\r\n    acf_add_options_page(array(\r\n        'page_title'    =&gt; 'Theme Settings',\r\n        'menu_title'    =&gt; 'Theme Settings',\r\n        'menu_slug'     =&gt; 'theme-settings',\r\n        'capability'    =&gt; 'edit_posts',\r\n        'redirect'      =&gt; false\r\n    ));\r\n\r\n}\r\n    <\/code><\/pre>\n<p>Once added, you\u2019ll see a new \u201cTheme Settings\u201d menu item appear within the WordPress dashboard.<\/p>\n<hr \/>\n<h2 id=\"create-fields\">Step 2: Create Your ACF Fields<\/h2>\n<p>Next, head to:<\/p>\n<pre><code>\r\nCustom Fields \u2192 Field Groups\r\n    <\/code><\/pre>\n<p>Click:<\/p>\n<pre><code>\r\nAdd New\r\n    <\/code><\/pre>\n<p>Create a new field group such as:<\/p>\n<pre><code>\r\nGlobal Theme Settings\r\n    <\/code><\/pre>\n<p>Now add your fields.<\/p>\n<p>Example fields:<\/p>\n<ul>\n<li>Phone Number<\/li>\n<li>Email Address<\/li>\n<li>Facebook Link<\/li>\n<li>Footer Text<\/li>\n<li>Site Logo<\/li>\n<\/ul>\n<hr \/>\n<h2 id=\"assign-field-group\">Step 3: Assign the Field Group to the Options Page<\/h2>\n<p>This is the important part many people miss.<\/p>\n<p>Under:<\/p>\n<pre><code>\r\nLocation Rules\r\n    <\/code><\/pre>\n<p>Set:<\/p>\n<pre><code>\r\nOptions Page is equal to Theme Settings\r\n    <\/code><\/pre>\n<p>This tells ACF to display these fields on your custom options page rather than on normal posts or pages.<\/p>\n<p>Publish the field group once complete.<\/p>\n<hr \/>\n<h2 id=\"add-content\">Step 4: Add Your Content<\/h2>\n<p>Now go to:<\/p>\n<pre><code>\r\nTheme Settings\r\n    <\/code><\/pre>\n<p>within the WordPress admin.<\/p>\n<p>You\u2019ll now see all your custom fields available to edit.<\/p>\n<p>Add your content and click:<\/p>\n<pre><code>\r\nSave Changes\r\n    <\/code><\/pre>\n<hr \/>\n<h2 id=\"display-fields\">Step 5: Display ACF Option Page Fields in Your Theme<\/h2>\n<p>To display fields from the options page, use:<\/p>\n<pre><code class=\"language-php\">\r\n&lt;?php the_field('phone_number', 'option'); ?&gt;\r\n    <\/code><\/pre>\n<p>The important part is:<\/p>\n<pre><code class=\"language-php\">\r\n'option'\r\n    <\/code><\/pre>\n<p>This tells ACF to retrieve the field from the global options page rather than from a post or page.<\/p>\n<hr \/>\n<h2 id=\"using-get-field\">Using get_field()<\/h2>\n<p>You can also store values in variables using <code>get_field()<\/code>.<\/p>\n<pre><code class=\"language-php\">\r\n&lt;?php\r\n\r\n$phone = get_field('phone_number', 'option');\r\n\r\necho $phone;\r\n\r\n?&gt;\r\n    <\/code><\/pre>\n<p>This is useful if you need additional logic or conditional statements.<\/p>\n<hr \/>\n<h2 id=\"real-world-examples\">Real World Examples<\/h2>\n<h3>Display a Phone Number<\/h3>\n<pre><code class=\"language-php\">\r\n&lt;a href=\"tel:&lt;?php the_field('phone_number', 'option'); ?&gt;\"&gt;\r\n    &lt;?php the_field('phone_number', 'option'); ?&gt;\r\n&lt;\/a&gt;\r\n    <\/code><\/pre>\n<h3>Display an Email Address<\/h3>\n<pre><code class=\"language-php\">\r\n&lt;a href=\"mailto:&lt;?php the_field('email_address', 'option'); ?&gt;\"&gt;\r\n    &lt;?php the_field('email_address', 'option'); ?&gt;\r\n&lt;\/a&gt;\r\n    <\/code><\/pre>\n<h3>Display a Logo<\/h3>\n<pre><code class=\"language-php\">\r\n&lt;?php\r\n\r\n$logo = get_field('site_logo', 'option');\r\n\r\n?&gt;\r\n\r\n&lt;img src=\"&lt;?php echo $logo['url']; ?&gt;\" alt=\"&lt;?php echo $logo['alt']; ?&gt;\"&gt;\r\n    <\/code><\/pre>\n<h3>Display Social Media Links<\/h3>\n<pre><code class=\"language-php\">\r\n&lt;a href=\"&lt;?php the_field('facebook_link', 'option'); ?&gt;\" target=\"_blank\"&gt;\r\n    Facebook\r\n&lt;\/a&gt;\r\n    <\/code><\/pre>\n<hr \/>\n<h2 id=\"common-mistakes\">Common Mistakes<\/h2>\n<h3>Forgetting &#8216;option&#8217;<\/h3>\n<p>This will not work correctly:<\/p>\n<pre><code class=\"language-php\">\r\n&lt;?php the_field('phone_number'); ?&gt;\r\n    <\/code><\/pre>\n<p>You must include:<\/p>\n<pre><code class=\"language-php\">\r\n&lt;?php the_field('phone_number', 'option'); ?&gt;\r\n    <\/code><\/pre>\n<h3>Incorrect Field Names<\/h3>\n<p>Make sure the field name exactly matches the field created within ACF.<\/p>\n<h3>Incorrect Location Rules<\/h3>\n<p>If your fields are not appearing on the options page, double-check your field group location settings.<\/p>\n<hr \/>\n<h2 id=\"final-thoughts\">Final Thoughts<\/h2>\n<p>The ACF Options Page is a fantastic way to manage global website content within WordPress.<br \/>\nIt keeps your content organised, reduces duplicated content management,and makes theme development much cleaner.<\/p>\n<p>Once configured, you can use the options page for almost anything across your website including:<\/p>\n<ul>\n<li>Headers<\/li>\n<li>Footers<\/li>\n<li>Contact information<\/li>\n<li>Call-to-actions<\/li>\n<li>Social media links<\/li>\n<li>Global design settings<\/li>\n<\/ul>\n<p>If you haven\u2019t already enabled the options page, make sure to check out my related tutorial on <a href=\"https:\/\/garethhardy.com\/blog\/activating-the-options-page-in-advanced-custom-fields\/\">activating the ACF Options Page in WordPress<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019re using Advanced Custom Fields in WordPress, the Options Page is one of the most useful features available. It allows you to create global fields that can be used across your entire website rather than being tied to individual posts or pages. This is perfect for content such as: Phone numbers Email addresses Social [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":58,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-49","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorised"],"acf":[],"_links":{"self":[{"href":"https:\/\/garethhardy.com\/blog\/wp-json\/wp\/v2\/posts\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/garethhardy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/garethhardy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/garethhardy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/garethhardy.com\/blog\/wp-json\/wp\/v2\/comments?post=49"}],"version-history":[{"count":6,"href":"https:\/\/garethhardy.com\/blog\/wp-json\/wp\/v2\/posts\/49\/revisions"}],"predecessor-version":[{"id":60,"href":"https:\/\/garethhardy.com\/blog\/wp-json\/wp\/v2\/posts\/49\/revisions\/60"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/garethhardy.com\/blog\/wp-json\/wp\/v2\/media\/58"}],"wp:attachment":[{"href":"https:\/\/garethhardy.com\/blog\/wp-json\/wp\/v2\/media?parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/garethhardy.com\/blog\/wp-json\/wp\/v2\/categories?post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/garethhardy.com\/blog\/wp-json\/wp\/v2\/tags?post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}