---
title: "How to set an anchor link to an accordion item in WordPress?"
url: https://nexterwp.com/docs/anchor-link-wordpress-accordion-item/
date: 2023-02-08
modified: 2026-08-26
author: "Aditya Sharma"
description: "What It Does Each item inside the Nexter Blocks Accordion block can carry its own Unique ID. Adding that ID after a # in any Link field, on a button,..."
image: https://nexterwp.com/wp-content/uploads/2024/05/anchor-link-wordpress-accordion-item-1024x519.jpg
word_count: 712
---

# How to set an anchor link to an accordion item in WordPress?

## Key Takeaways

- Nexter Blocks Accordion block uses a Unique ID on each accordion item, and adding # plus that ID in a Link field opens the matching item when the page loads.
- Anchor links scroll to the matching accordion item and switch it open with no extra click, which helps FAQ pages, knowledge base articles, and product pages surface the right content immediately.
- Nexter Blocks needs to be installed and activated, and the feature works from buttons, menus, other accordion items, same-page links, different-page links, and external sites.
- Unique IDs must exactly match the # fragment and stay unique across the whole page, or the accordion loads normally with items closed and only the first matching ID responds.

## What It Does

Each item inside the Nexter Blocks Accordion block can carry its own Unique ID. Adding that ID after a `#` in any Link field, on a button, a menu item, or a link from another page, opens that specific accordion item as soon as the linked page loads.

## Why It Matters

Without an anchor link, a visitor who follows a link to a long FAQ or specs accordion lands on a wall of collapsed items and has to scroll and click to find the one answer they came for. An anchor link opens the right item automatically, so the answer is visible the moment the page loads.

## What You Get

A link that, when clicked, scrolls the page to the matching accordion item and switches it open, with no extra click needed from the visitor.

*For the full settings overview of the Nexter Blocks Accordion block, [see this guide](https://nexterwp.com/docs/add-accordion-in-wordpress/).*

## Capabilities

- Set a Unique ID on any individual Accordion item.

- Link to that item with `#` plus the ID from any block's Link field, including buttons, menus, and other accordion items.

- Works from links on the same page, from a different page, or from an external site.

- Needs no extra plugin or shortcode. It uses the block's own Unique ID field.

## How It Works

Every accordion item has a Unique ID setting in the block editor. When a linked element carries `#your-id` in its Link field and the visitor opens (or lands directly on) the page, the Accordion block reads that ID from the page URL, scrolls to the matching item, and switches it to the open state. If the URL fragment does not match a configured Unique ID exactly, nothing happens and the accordion loads normally with its items closed.

[LIVE BLOCK LINK](https://nexterwp.com/nexter-blocks/?from=tpblocks&utm_source=tpag&utm_medium=docs&utm_campaign=text)

## How to Use It

**Before you start:** this feature is part of the Nexter Blocks Accordion block, so Nexter Blocks needs to be installed and activated.

- Add the Accordion block to the page and select the item you want to link to.

- Open its settings and enter a Unique ID, for example `faq-item-1`. Use only lowercase letters, numbers, and hyphens.

![Nexter Blocks Accordion item settings panel showing the Unique ID field](https://nexterwp.com/wp-content/uploads/2023/02/accordion-layout-unique-id-new.png)

- On the block or button you want to link from, for example an Advanced Button, open its Link field and enter the ID with a `#` in front, such as `#faq-item-1`.

- Publish the page and test the link. When it is clicked, the page should scroll to that accordion item with it already open.

![Advanced Button block Link field with the accordion item](https://nexterwp.com/wp-content/uploads/2023/02/accordion-layout-advanced-block-link-new.png)

Also check, [How to use Image Gallery, Video inside Accordion WordPress Block](https://nexterwp.com/docs/image-video-inside-accordion-block/).

## Use Cases

- FAQ pages, linking straight to one question from an email, an ad, or an external referral so the visitor does not have to search for it.

- Knowledge base articles, where a table of contents at the top links down to a specific collapsed section.

- Product pages, where a button such as "See Full Specs" scrolls to and opens the accordion item that holds that information.

## Limitations

- The ID after `#` must exactly match the Unique ID configured on that accordion item. A heading anchor or a guessed slug, for example `#h-3`, will not open the accordion since it does not match anything the block is looking for.

- Unique IDs must be unique across the whole page. If two accordion items share the same ID, only the first one in the page's HTML responds to the link.

- This only works with the Nexter Blocks Accordion block. It does not extend to other accordion-style blocks or plugins.

## Troubleshooting

- **The page scrolls to the accordion but the item does not open.** Double check that the ID after `#` matches the accordion item's Unique ID exactly, letter for letter. A support case traced this exact symptom back to a link pointing at `#h-3`, an autogenerated heading anchor, instead of the accordion item's actual Unique ID.

- **The accordion opens on desktop and phone but not on iPad or other tablets.** This has been reported on a block-theme site running Nexter Blocks. If you hit this, confirm you are on the latest Nexter Blocks version, then contact support with your device and browser details.

- **Nothing happens at all when the link is clicked.** Check for a duplicate Unique ID elsewhere on the page. Browsers only respond to the first element carrying a matching ID.