Skip to content
GPLWP Guides

How to add tabs and accordions to a WordPress site

Design & Layout Time About 20 minutes 7 steps Updated 13 Sep 2026

DESIGN & LAYOUT
The short answer

You can add accordions with WordPress's built-in Accordion or Details blocks, and newer WordPress versions also include a Tabs block. If your editor or page builder lacks those features, use a tabs and accordion plugin rather than building the keyboard and responsive behaviour yourself.

The route
  1. 01Choose the right content pattern
  2. 02Add a native block
  3. 03Fill each panel carefully
  4. 04Use the no-plugin route
  5. 05Style and check mobile views
  6. 06Test the finished interaction
  7. 07Take the fast plugin route

What you need

  • Administrator or editor access to WordPress
  • The Block Editor, Elementor, or another page builder
  • Content grouped into short tab or accordion sections
  • A recent backup if changing a live page

Choose the right content pattern

Use tabs when visitors need to switch between related categories, such as specifications, services, or product information. Use an accordion when visitors may want to open several answers, such as FAQs or troubleshooting steps.

Keep important introductory information outside the collapsed areas. On mobile, a long row of tabs may wrap awkwardly, so check whether an accordion layout would be easier to use.

Add a native block

Open the page or post in the Block Editor and select the plus button. Search for Tabs or Accordion, then insert the block where the content should appear. WordPress 7.1 and later provide native Tabs and Accordion blocks; older installations may provide the single-section Details block instead.

Add or remove items from the block, then enter a short label or heading for each one. Accordion settings can usually control whether multiple items may stay open and which item opens initially.

Fill each panel carefully

Write labels that describe the content without making visitors guess. Add headings, paragraphs, lists, images, buttons, or other suitable blocks inside each panel rather than putting links or buttons inside an accordion heading.

Keep each panel focused. If one tab contains several unrelated topics, split it into separate tabs or use headings inside the panel so the page remains scannable.

Use the no-plugin route

A basic accordion does not require a plugin. Use the native Accordion or Details block, or add a <details> element through an HTML block if your editor supports it. This gives you simple show-and-hide behaviour with little extra code.

Tabs are more complicated without a suitable block or widget. A custom version needs correctly connected tab buttons, panels, keyboard behaviour, focus handling, responsive styling, and usually JavaScript. It can work, but a copied snippet often breaks after a theme change or becomes difficult to use with a keyboard or screen reader.

Style and check mobile views

Use the block, widget, or theme styling controls to set colours, spacing, borders, typography, active states, and icons. Avoid relying on colour alone to show which tab is selected, and keep labels short enough to wrap cleanly.

Preview the page on a phone and reduce the number of tabs if the tab row becomes crowded. Also check that opened accordion content is not hidden behind a sticky header or clipped by a fixed-height container.

Test the finished interaction

Open the published page in a private browser window and test every tab and accordion item. Use a keyboard to move through the controls, confirm that the active state is visible, and check that links, forms, images, and buttons inside panels still work.

If the content disappears after caching or a theme update, clear the site and browser cache before troubleshooting further. A JavaScript optimisation setting can also interfere with custom tab widgets, so test with script delay or combination features temporarily disabled.

Take the fast plugin route

For a faster setup with more layout control, use JetTabs. It provides Elementor-friendly tabs and accordions with drag-and-drop styling, responsive layouts, animation options, icons, and shortcode support, so you can build the sections without writing the interaction code yourself.

Install the plugin from the WordPress dashboard, activate it, create the tab or accordion items, and place the resulting widget or shortcode on the page. This is the practical choice when you need vertical tabs, reusable layouts, or several styled components across a site.

The fast route

Let JetTabs do it

Elementor-friendly tabs and accordions with drag-and-drop styling, ideal for organizing dense page content without custom code.

Get JetTabs

Questions

Can I add an accordion in WordPress without a plugin?
Yes, you can add a basic accordion without a plugin by using the native Accordion block, Details block, or an HTML details element. This is fine for FAQs and small content sections. You may still need custom CSS for precise branding, and a plugin is more suitable when you need advanced layouts, animations, reusable components, or page-builder integration.
Can I add tabs in WordPress without a plugin?
Yes, newer WordPress installations can provide a native Tabs block, and some page builders include their own Tabs widget. If your editor does not offer one, a custom tab interface requires HTML, CSS, and JavaScript for switching panels and handling keyboard access. A dedicated plugin is usually safer than adapting an unmaintained code snippet.
Should I use tabs or accordions for an FAQ?
Use an accordion for most FAQs because visitors can scan the questions vertically and open one or more answers. Tabs are better when the answers belong to clearly separate categories and visitors are likely to compare those categories. Do not hide essential instructions, warnings, or contact details where visitors may miss them.
Why are my tabs or accordions not working after an update?
Theme conflicts, cached scripts, delayed JavaScript, minification, and fixed-height containers are common causes. Clear the WordPress, caching-plugin, CDN, and browser caches first, then test the page with script optimisation temporarily disabled. If only a custom widget fails, check its browser console errors and confirm that its supporting CSS and JavaScript still load.