Skip to content

Create an Options Page for Site-Wide Custom Fields

Key Takeaways

  • Options-page field groups store site-wide values in wp_options and read them anywhere by passing option as the object, with values stored as wp_options rows prefixed nxt_option_.
  • Nxt_field_value( 'support_phone', 'option' ) reads a site-wide support phone number, and the example formats it as a tel: link after stripping nonnumeric characters.
  • Multisite keeps options per-site, so one site does not see another site’s option value, and uninstalling with “delete data” enabled does not remove the nxt_option_ rows.
Table of Contents

Some values belong to the site, not to any post — a support phone number, a global notice, default social links. An options page is where those live.

What It Does

An options-page field group is not attached to content. Its values are stored in wp_options and read anywhere, from any template.

Before You Start

  • A field group with the fields you want site-wide.
  • Administrator access.

Read an Options Value

  1. Create the field group with the fields you need.
A field group open in the builder
  1. Set it up as an options-page group rather than giving it post-type location rules.
  1. Enter the values once.
  1. Read them anywhere by passing option as the object.

When to Use It

  • Contact details used in a header or footer.
  • A site-wide announcement bar.
  • Default values a template falls back to when a post leaves a field empty.

Display the Value

Reading a site-wide value:

<?php
$phone = nxt_field_value( 'support_phone', 'option' );
if ( $phone ) {
    printf( '<a href="%s">%s</a>',
        esc_url( 'tel:' . preg_replace( '/[^0-9+]/', '', $phone ) ),
        esc_html( $phone ) );
}

Limitations

  • Options pages do not use location rules. The group is placed directly, so the rules panel does not apply to it.
  • Values are stored as wp_options rows prefixed nxt_option_. They are global — there is one value per site, not one per post.
  • On a multisite network each site has its own options, because wp_options is per-site.
  • Option values are not removed when the plugin is uninstalled with “delete data” enabled. Remove the nxt_option_ rows by hand if you need a clean uninstall.

Troubleshooting

The value reads empty in my template

Pass 'option' as the second argument. Without it the function looks at the current post, which has no such field.

I set a value on one site of my network and another site does not see it

Correct. Options are per-site on multisite. Set it on each site, or store it as a network option in your own code.

Related Docs

Share your Thoughts

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

How do site-wide custom fields work in WordPress options pages?

An options page stores values for the site itself instead of attaching them to a post. In Nexter, Nexter WP, NexterWP, nexterwp.com, Nexter Theme, Nexter Blocks, Nexter Extension, Nexter Suite, POSIMYTH Nexter, that means things like a support phone number, a global notice, or default social links can be read from any template. The key detail is that the data lives in wp_options, so it behaves like shared site settings rather than post meta.

When should I use an options page instead of post custom fields?

Use an options page when the same value needs to appear in multiple places across the site. The page calls out contact details in a header or footer, a site-wide announcement bar, and default values a template falls back to when a post field is empty. That pattern keeps repeated data in one place, which reduces drift when the same phone number or notice needs to stay consistent everywhere.

Why is my options field empty in my template?

The usual cause is reading it like a normal post field. For an options-page value, the function needs 'option' as the second argument. Without that, it looks at the current post, and there is no matching field there. In practice, this matters most in templates that are reused across many pages because the value is global, not tied to one post.

Do options pages work on a WordPress multisite network?

They work per site, not across the whole network. Since wp_options is per-site on multisite, one site’s option value will not automatically appear on another site. That makes options pages useful for local site settings, but not for shared network-wide data unless you store it as a network option in your own code.

What are the limitations of WordPress options pages for custom fields?

Options pages do not use location rules, so the rules panel does not apply to them. The group is placed directly and its values are stored as wp_options rows prefixed nxt_option_. They are global within a site and stay behind as nxt_option_ rows even if the plugin is uninstalled with “delete data” enabled. If you need a clean uninstall, those rows have to be removed by hand.

How do I display a support phone number from an options page in WordPress?

The page shows reading the value with nxt_field_value( 'support_phone', 'option' ) and then turning it into a tel: link. That second argument is what tells Nexter to pull from the options page instead of the current post. A practical detail here is sanitizing the phone number before building the link so only digits and plus signs remain.

Last reviewed: November 12, 2026

Related Docs