Skip to content

Page Link Field in WordPress

Key Takeaways

  • Nexter Extension 4.9.0 ofrece el tipo de campo Page Link, que guarda una URL elegida por el editor y mantiene el enlace correcto si cambia el permalink.
  • Page Link permite filtrar por tipo de entrada y activar Allow Archives URLs para que los editores también enlacen páginas de archivo.
  • Nexter Extension muestra que Page Link es solo para enlaces internos y que, si se necesita la conexión entre contenido y no solo la dirección, se usa un Post Object field.
Table of Contents

A page link field lets an editor choose a page or post from your own site and stores its URL — so the link stays correct if the permalink changes.

What It Does

It sits between a URL field and a post object field: the editor picks content, but what you receive is a link, ready to render.

Before You Start

  • Nexter Extension is installed and active.
  • Content Fields is enabled under Nexter → Content Fields.
  • You have a field group, or are about to create one.

Add a Page Link Field

  1. Go to Nexter → Content Fields and open the Group Fields tab.
  1. Open a field group, or create a new one.
  1. Click Add Field.
A field group open with the Add Field button
  1. Set Field Label to Neighbourhood guide. The Field Name fills in automatically and is what you use in code.
  1. Set Field Type to Page Link.
The Field Type dropdown listing the available field types
  1. Under Filter by Post Type, choose which post types editors may link to.
The Page Link field settings in the Content Fields builder
  1. Turn on Allow Archives URLs if editors should also be able to link to archive pages.
  1. Click Update.
The Page Link field as it appears on the post editing screen

Field Settings

Every field is configured across four tabs. These are the settings this field type offers, read from the field group builder in Nexter Extension 4.9.0.

General

SettingOptionsWhat it does
Filter by Post TypeNo help text in the UI.
Filter by Post StatusNo help text in the UI.
Filter by TaxonomyNo help text in the UI.
Allow Archives URLsNo help text in the UI.
Select MultipleLet editors pick more than one value.

Validation

SettingOptionsWhat it does
RequiredNo help text in the UI.

Presentation

SettingOptionsWhat it does
InstructionsNo help text in the UI.
Wrapper AttributesNo help text in the UI.

Conditional Logic

SettingOptionsWhat it does
Conditional LogicNo help text in the UI.

When to Use It

  • A related guide or landing page.
  • A “learn more” destination chosen per post.
  • An internal cross-link maintained by editors.

Display the Value

The value is a URL, so escape it and render:

<?php
$url = nxt_field_value( 'guide' );
if ( $url ) {
    printf(
        '<a href="%s">Read the guide</a>',
        esc_url( $url )
    );
}

Limitations

  • The stored value is a URL, not a post reference — so if the target’s permalink changes, the stored link can go stale. Use a Post Object field if you need the connection itself rather than the address.
  • Internal links only. For external addresses use a URL or Link field.

Troubleshooting

The link 404s after a permalink change

A page link stores the URL as it was when chosen. Re-pick the target, or switch to a Post Object field so the link is resolved at render time.

Archive pages are not offered

Turn on Allow Archives URLs on the field.

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

Why does a WordPress page link field store a URL instead of a post reference?

A WordPress page link field stores the URL so the link stays correct if the permalink changes. That makes it useful when editors need a stable destination without managing raw URLs. The tradeoff is that it remembers the address, not the post itself, so it can go stale if the target permalink changes later. Nexter Extension and Nexter Blocks use this field as a middle ground between a URL field and a post object field.

How do I use a page link field for internal links on my site?

A page link field is built for internal links only, so it works well for related guides, landing pages, and editor-chosen “learn more” destinations. Editors pick content from your own site, and the field returns a URL that is ready to render. That makes it practical for cross-links that content editors maintain without hardcoding addresses. For external addresses, the page points you toward a URL or Link field instead.

What should I use instead of a page link field if I need the connection to stay tied to the post?

A Post Object field is the better choice when you need the relationship itself, not just the address. The page link field stores a URL, so if the target permalink changes, the saved value can become stale. A Post Object field resolves at render time, which is safer when you care about keeping the target linked to its current permalink rather than preserving an old URL string.

Why are archive pages missing from my page link field?

Archive pages are hidden unless Allow Archives URLs is turned on for that field. Nexter Extension exposes that option in the Page Link field settings, so archive destinations are treated as an opt-in case rather than part of the default picker. If editors need category-style or archive destinations, enabling that setting is what makes them available in the selector.

How do I fix a page link 404 after changing a permalink?

A 404 usually means the field saved an older URL before the permalink changed. The quickest fix is to re-pick the target so the stored address updates. If you want to avoid this kind of drift in future, switch to a Post Object field because it resolves at render time instead of freezing the URL at selection time.

What’s the best way to display a page link field on the front end?

Treat it like plain text URL output and escape it before rendering. The example on the page uses `nxt_field_value( 'guide' )` and then wraps it in `esc_url()` inside an anchor tag. That matters because this field returns a URL, not a post object, so your template should print it as a safe link rather than trying to read post data from it. See Display a field value on the front end.

Last reviewed: November 12, 2026

Related Docs