Table of Contents
WordPress Anchor Links help users improve a page’s user experience. Using Anchor Links, users can jump around page sections – without leaving, reloading, or refreshing a page.
In this article, we help users understand how WordPress Anchor Links work and critical points on why WordPress anchor Links are not working.
Introduction: Anchor Links WordPress
WordPress anchor links help users navigate between different sections on the same page. In other words, using anchor links in WordPress allows users to jump, move around, up, and down between various sections on the same page without leaving or reloading a page or post.
WordPress anchor links are helpful if you’re creating long-form articles in WordPress. Users can quickly jump between articles’ sections, headings, and important paragraphs using plugins or manual routines for anchor links.
The manual routine for creating anchor links requires custom source code placed inside the content’s code editor in the WordPress dashboard. On the other hand, a plugin for the said purpose allows users to create anchor links that help them jump between headings, such as H2, H3, and H4. In this case, the plugin automatically creates anchor links to existing headings in the content.
Problem Fix: WordPress Anchor Links not Working
Here, we will address ways, routines, and developmental edits to help you fix anchor link issues in WordPress. You can start the browser cache, followed by more complex maneuvers’ in the WordPress dashboard.
In the case of a plugin, consider changing the Technical aspects of how anchor links work on WordPress pages and posts. On the other hand, if you’re creating anchor links manually with a custom script, consider looking into the custom code, attributes, and tags you have used for anchor links. Also, if you’ve created anchor links with a page builder’s options, such as Divi Builder or Elementor, consider looking into custom CSS IDs or module settings for more information.
Code Gaps in Manual Routines
In WordPress, users can manually create anchor links and use point-and-click plugins. If you’re using plugins to create anchor links, check if settings, configuration, and Technical stats are correct. You can also look for more information in a plugin’s documentation.
Let’s address the second part: If you’re creating HTML anchor links manually in the WordPress editor, gaps in the source codes leave no space for corrections. For example, you can create anchor links pointing to specific page sections using the WordPress code editor. Anchor links won’t work correctly if your source code lacks proper attributes, pointers, or tags.
In this case, the only way to fix anchor link issues in WordPress is to ensure the source code used for anchor link text is error-free.
Improper Configuration
If you’re using a plugin for anchor links, find out if your site’s theme features prevent them from working correctly. Some themes may have different anchor link options.
To see if such options are included in the Theme, consider looking into the Theme Customizer. After you have finished installing your site’s theme, you can also look at the welcome screen.
Plugin’s Misconfiguration (GP Premium)
Anchor links can stop working in WordPress due to errors, bugs, or weaknesses in a specific script, plugin, or Theme.
For example, GP Premium updates can stop anchor links on pages. In such scenarios, the best option is to follow the official recommendation.
Browser Cache Issues (Disable Cache Plugin, Temporary)
Browser cache could cause problems with Anchor Links. When a browser’s cache is cleared, the page in question is rendered and loaded from scratch – making anchor links work smoothly without errors and gaps.
Related Reading: Learn how to clear Browser Cache (Major Browsers explained)
Once you’ve cleared the browser’s cache, refresh the page. If the problem persists, hard refreshing the page will fix issues with anchor links.
Cache plugins can also cause anchor link problems in WordPress. For example, when a page, theme, or plugin is activated or deactivated in WordPress, cache plugins require clearing the stored cache. Clear the browser’s cache before you can check anchor links in WordPress. On the other hand, if the problem with anchor links persists, see if deactivating cache plugin(s) can fix the issue.
Code Bugs in Plugins Used for Anchor Links
The plugins used for anchor links can return errors. Such routines can cause anchor links to stop working correctly in WordPress. In such cases, updating a plugin for anchor links is the prime suspect.
There are two ways to go around such cases.
- Re-install the plugin’s previous version. You can call it reverting the plugin to its older version. For more information on installing a plugin with the old version, consult the official WordPress documentation, ask your site’s support team, or hire a WordPress specialist.
- Use a different plugin if the current site’s infrastructure is not suitable. You can also go for the manual anchor links, where placing a specific line of code in the WordPress code editor will work.
Note: If using a specific plugin is the only option, wait until the plugin has been updated. The updating routine removes bugs in a plugin – making it work correctly. In such scenarios, ensure no two plugins for the anchor links are used simultaneously. Such routines can create plugin conflicts in WordPress, which in turn cause complex issues, such as White Screen of Death.
Website Migration Causes Problems
Website migration is moving a site’s files from one host to another. In this case, manual edits, page templates, or developmental edits can cause anchor link issues.
So, if the anchor links were created manually, check or repeat the source code information in WordPress. If, for example, you need to install the essential plugin(s) for the anchor links, do so accordingly.
Programs (JavaScript) can make Links unclickable
In WordPress, check if JavaScript is preventing clicks on pages and posts. This mostly happens if you’ve undergone custom developments in WordPress. In this case, consult your site’s Support Team to help you assess, find, and fix JavaScript issues in WordPress.
Sometimes, JavaScript options in the browser help you sort out on-page clicks. In this case, turn the JavaScript option on and off to see if changing browser option(s) helps you out.
Try out different Browsers (Hard Refresh as well)
WordPress edits can cause cache problems. Although this mostly doesn’t happen, it can affect WordPress pages’ display, hyperlinks, and design issues in specific browsers.
Typically, users can hard refresh pages to see if recent changes have occurred in WordPress. However, consider changing your browser if a hard refresh doesn’t help. In this case, you should consider using Firefox.
Let’s learn how to check anchor link issues in different browsers.
First, consider various browsers to see if loading pages that contain anchor links fix the issue. In this case, you don’t need to refresh, hard refresh, or clear the browser’s cache.
On the other hand, if loading pages doesn’t yield positive results, you should consider hard-refreshing the pages.
In this case – once you have loaded the pages, right-clicking the page will create a short menu. Choose the Inspect option from the quick menu. Next – right-click the refresh icon and choose Hard Reload from the straightforward menu. You can follow the options in Chrome; the same routine works in other browsers – too.
Note: If hard-refreshing doesn’t help, you can skip checking other ways to see if specific routine(s) can.
Related Reading: How to Handle Broken Links in WordPress
Address the Index.PHP file in URLs
Sometimes, users install WordPress to external, non-default, or custom directories on hosting platforms. This only happens sometimes; however, it depends on users’ preferences.
When this happens, regular URLs are over-written with Index.PHP inside. For example, instead of accessing URLs with sitedomain.com/page-URL/, you may need to enter sitedomain.com/index.php/page-URL. In such scenarios, anchor links would only work once you place index.php in the URLs, especially when creating anchor links in WordPress.
Fixing Index. PHP-based URL problems in pre-built sites yield complex scenarios. However, if your site is young, not indexed in Google, or doesn’t drive traffic, you should reinstall WordPress from its default directory, Public_HTML. If re-installation seems complicated, fix such issues with a plugin used for anchor links in WordPress. You’ll need to handle Index.PHP issues in WordPress, especially if you’re trying to create anchor links manually.
Let’s see how a typical anchor link’ URL will look in WordPress if your site is experiencing Index.PHP issues in URLs.
https://www.sitedomain.com/index.php/#section
Assuming protocols, redirects, and SSL settings are correct; the above URL will work if WordPress is installed in a different directory other than the default one.
Desktop vs Mobile
Anchor Links may behave differently on Desktop and Mobile devices. Desktop PCs usually have cache issues with anchor links. Third-party scripts, design elements, or custom plugins on mobile and handheld devices can prevent anchor links from working correctly.
Consider turning off custom plugins for mobile devices. Also, see if turning off the mobile header feature helps fix device anchor link issues. Mobile header and menu options sometimes cause problems with WordPress anchor links.
In this case, running A/B testing on what’s happening returns positive results. One by one, consider turning off features That might affect mobile navigation, menu links, or on-page sections. Please clear your browser cache each time you check a specific feature. In this case, if, for example, the cache plugin is installed and gives prompts to clear the cache, do so accordingly. Read your theme’s official recommendations for more information on dealing with anchor link problems. You can also consult error logs of your site’s assets, including themes, premium plugins, or 3rd party scripts installed.
WordPress Core Update Causes Problems (Slide or Video)
Sometimes – WordPress core updates may create anchor link issues. In this case, consulting developers’ assistance can help you fix issues.
On the other hand, a WordPress page with videos, slides, or audio player widgets may cause problems when jumping sections with anchor links. In this case, there are two ways to fix such issues.
- Remove and re-create the anchor links and text – after you have updated your post or page with videos, slides, or audio-player widgets in WordPress.
- If not necessary – remove videos and slides from the page’s content.
Note: Once done – check your page’s performance in different browsers. Sometimes, anchor links don’t perform well in Chrome, while preventing the page in Firefox plays well.
Protocol and Redirect errors in URLs
Anchor Links may fail to work if the protocols don’t match. In this case, make sure there is no difference between HTTP protocols placed in the source codes.
For example, if the page you create anchor links on loads with an insecure protocol, such as HTTP, the manual anchor links on the page may fail to work correctly if the target links’ URLs are set with HTTPS.
You must use the following two methods to fix anchor link issues in WordPress.
- Set the protocol currently used by WordPress, such as HTTP or HTTPS.
- Find your site’s default protocol and ensure the anchor links are placed accordingly.
Note: In WordPress, protocol errors can cause anchor link issues. If you’re using plugin(s) to create anchor links, you can skip checking for protocol errors.
In case of redirects, various versions of a site’s domain should redirect to a single location. For example, if a user enters your site’s address with www, HTTPS, HTTP, or without www, the user should be redirected to a single location, such as your site’s address with www at HTTPS. In this case, the whole infrastructure, protocols, and redirects—if correct—can help you fix anchor link issues in a WordPress website.
Use an online redirect-checking tool to check your site’s domain’s final destination for redirects. Make sure you have entered your site’s URL versions in the tool. Once the tool returns results for redirects, see if URLs point to a specific version of your site’s URL. You can use the SITE operator to confirm your site’s final URL with Google. Once entered into Google site:yoursitedomain.com, you can see the indexed URLs. The one you see on Google search pages is the final destination, also called the default URL of your site. Be aware that you don’t need to change anything, especially if you don’t know about specifics, Technical aspects of the trade, or custom changes you don’t know. Ask your site’s Support Team for more information on carrying out specific maneuvers.
Note 2: If your site’s database contains links with mixed protocols, such as HTTP and HTTPS – your site’s stats may return diverse content issues. In this case, you’ll need to check, re-edit, and fix such problems in the WordPress database. In such scenarios, changing database values manually may seem complicated to most users, especially beginners. However, the WordPress point-and-click plugins can help you find, fix, and maintain mix protocol errors in the WordPress database. In this regard, search and install the Better Search Replace plugin. For more information on how to use the mentioned plugin, consult its official resource. Changing database values without prior knowledge is dangerous here, as you can destroy your whole site.
Frequently Asked Questions (FAQs)
Why are my links not working on WordPress?
There are various ways anchor links need to be fixed in WordPress, such as problems in source code, incorrect destination, or problems due to site migration.
You can start from the basics, such as clearing your browser cache to see if things go in the right direction. On the other hand, check the attributes of your links, especially if you have created anchor links using manual routines. You can also check the settings of the plugin you used for anchor links in WordPress.
How do I anchor a link in WordPress?
There are two ways to create an anchor link in WordPress.
You can manually create an anchor link in the WordPress editor using the code editor view. In this regard, you must place a specific code snippet in the editor and define the target location using a hashtag. On the other hand – you can use a point-and-click plugin to create anchor links in WordPress. In the case of a plugin, the settings page can help you see relevant measures to create anchor links, their attributes, and hashtags used for anchor links. If creating heading anchor links is the only purpose, you can install a plugin to create a table of contents.
Why are my links not clickable in WordPress?
You can check your browser’s JavaScript settings to see if JavaScript is causing link issues. On the other hand – browser cache can also cause link click topics in WordPress.
Consider removing the browser cache to see if it is the culprit. If you need to learn how JavaScript works, consult a Support Team or WordPress expert.
What are anchor links in WordPress?
Anchor links are regular in WordPress and jump links to various sections on the same page. In this case, users don’t need to reload, edit, or refresh a specific page. With a blink of an eye, an anchor link takes users to respective sections on the same page. In WordPress, anchor links jump to headings, specific sections or elements, or to the top or bottom of a page.
Creating anchor links in WordPress is simple. Users can quickly create anchor links to various sections on a WordPress page using manual code snippets or a point-and-click plugin in the dashboard. They can also generate anchor links using page builders, especially on long-form sales pages.
Are anchor links good for SEO?
Yes, anchor links help search engines like Google efficiently handle long-form content. Search engines can also show anchor links on search pages, assisting users in opening directly to various sections of a page ranked on Google.
Anchor links help search engines improve user experience and functionality. Due to better understanding, search engines show anchor links on search entries to improve rankings.
What is an example of an Anchor Link in WordPress?
Anchor links are everywhere in WordPress. For example, you can see anchor links on the main navigation bars in WordPress. Users who click on navigation links are taken to on-page sections without loading the whole page. This routine is mainly seen on one-page sites, such as portfolio sites That contain various sections on the same page.
Page headings jump to their respective sections in long-form articles with over 3000 words. In this case, users create anchor links with a plugin for the table of contents. When users create headings while writing content in the WordPress editor, the plugin automatically creates anchor links on headings, which directly jump over to respective sections. In WordPress, users can also generate anchor links using buttons. In this case, page builders or custom coding can help users configure buttons for anchor links. If you’re dealing with a page builder, consult its official recommendation on how to set anchor link attributes.
Wrapping Up
WordPress Anchor Links, not Working
So, what are Anchor Links in WordPress, and how do you deal with anchor link issues as a beginner? If you’re creating, editing, and maintaining page authority with long-form content – creating anchor links is a routine-based thing for you.
WordPress anchor links are helpful, especially when creating long-form content with different sections. You can also use anchor links in sales pages to help users quickly jump to various page sections.
When an anchor link is not working, WordPress offers various possibilities. From basics, such as investigating cache issues, to advanced checks, including checking the database for mixed content values, you can fix anchor link issues in WordPress. However, be aware of the consequences. If you need to know what you are doing, consider hiring WordPress specialists.
For more information on using anchor links in WordPress, by manual routines, or WordPress plugins – consult our specialists. We can also help you maintain WordPress stores, remove errors, optimize page speed, and back up your site without taking pages down.