Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
accessibility

How to Add Links to Widget Titles in WordPress

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The simplest way to make a WordPress widget heading clickable is to use a Heading block in a block-enabled widget area, select its text, and apply the editor’s Link control (or press Ctrl+K on Windows/Linux or ⌘+K on Mac). If the heading belongs to a legacy PHP widget, WordPress has no universal “make title clickable” switch; the widget and theme determine whether a code customization is possible.

Choose the method that matches your theme and widget

Situation Recommended approach Main trade-off
You can add blocks in a classic theme’s widget area Heading block with the Link control Fastest method, but you may need to adjust typography and spacing to match existing widget titles.
You use a block theme Edit the relevant template part or pattern in the Site Editor The traditional Appearance > Widgets screen does not control the equivalent area.
A legacy, core, plugin, or custom widget supplies the title Check the widget’s settings, then use targeted theme or plugin code if necessary Behavior varies by implementation and requires front-end testing.
You only need a manually authored linked heading Put a heading and anchor in a Custom HTML widget’s content The link is content, not the widget’s title field.

Method 1: Link a Heading block in a widget area

This is the user-facing solution when your classic theme exposes block-based widgets. WordPress introduced the block-based Widgets editor in version 5.8 for classic themes that use widgets. It lets you place blocks alongside legacy widgets.

  1. Open Appearance > Widgets and select the sidebar, footer, or other widget area you want to edit. This path applies to classic themes that support widget areas.
  2. Click the inserter, add a Heading block, and enter the title text.
  3. Select the heading text. Click the Link button in the block toolbar, or press Ctrl+K (Windows/Linux) or ⌘+K (Mac).
  4. Search for an internal post or page, or paste the complete external address beginning with https://, then apply the link.
  5. Review any available options, such as opening the destination in a new tab or adding a nofollow attribute. Which options appear can vary by block and WordPress version.
  6. Save or update the widget area, view the front end, and adjust the heading’s typography, margins, and padding so it aligns with the theme’s other widget headings.

The editor checks that the address is formatted as a URL; it does not confirm that the destination exists or will load. Test the link yourself before publishing.

Method 2: Handle a classic PHP widget title

In a classic theme, the visible title may be generated by a PHP widget rather than an editor block. Identify the exact widget first: a core widget, a plugin widget, and a custom widget may render titles differently.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the theme controls

The theme’s register_sidebar() configuration accepts before_title and after_title values. These define the wrapper markup around a title, such as an opening and closing heading element. They do not automatically turn the title into a link; the widget’s rendering code supplies the title value.

What the widget filter can do

WordPress provides the widget_title filter, and a range of core widgets apply it. A developer can use that filter to alter title output for compatible widgets, but it is not a universal clickable-title setting. A third-party or custom widget may skip the filter, escape the value, or otherwise handle HTML differently.

A maintainable customization workflow

  1. Inspect the widget and theme implementation to confirm how the title is generated and whether widget_title is applied.
  2. Apply site-specific code in a child theme or small site plugin rather than editing the parent theme.
  3. Target only the required widget, preserve the theme’s existing heading wrapper, and add the anchor around the intended text.
  4. Test the resulting HTML, keyboard focus, mobile layout, and destination on a staging copy before changing a production site.

Because implementations differ, a code snippet that works for one widget is not evidence that it will work for every widget.

Method 3: Use a Custom HTML widget

The Custom HTML widget accepts HTML in its content area, so you can create a linked heading manually:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<h2><a href="https://example.com/section/">Section name</a></h2>

Do not paste that anchor into the widget’s separate Title field. On update, the built-in widget sanitizes that field with sanitize_text_field(), so markup is treated as text rather than a reliable link.

For this method, leave the title field empty and place the heading-and-link markup in the content area. Match the heading level to the page outline, check spacing against neighboring widgets, and use link text that remains meaningful when read out of context.

Block themes: edit the Site Editor instead

Block themes do not use traditional widget areas in the same way as classic themes. Open the Site Editor and edit the relevant template part or pattern—often a sidebar, footer, or header area—then insert a Heading block and apply the Link control. If you cannot find an Appearance > Widgets screen, that is expected for a block theme; look for the corresponding template part in the Site Editor.

Accessibility and troubleshooting checklist

  • Use descriptive text: “Browse tutorials” is clearer than “Click here,” especially when links are listed by a screen reader.
  • Keep heading structure logical: choose a heading level that fits the page’s existing outline rather than selecting a level only for its visual size.
  • Check keyboard use: tab to the heading link and verify a visible focus indicator.
  • Preview the front end: confirm the link appears where expected and that its destination loads.
  • Watch for escaping: if an anchor displays as literal text, the widget is sanitizing or escaping its title; move the markup to Custom HTML content or use a targeted customization.
  • Check theme updates: parent-theme edits can be overwritten, which is why a child theme or site plugin is safer.
  • Verify permissions: HTML controls and available link options can be limited by user role or block settings.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Which option should you use?

Use a Heading block when you control a block-enabled widget area and do not need the heading to remain tied to a legacy widget’s internal title field. Use the Site Editor for a block theme. If a specific classic widget must retain its native output, inspect that widget and implement a narrowly scoped child-theme or plugin change. Choose Custom HTML content when a standalone linked heading is sufficient and you are comfortable maintaining its markup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.