Fixed Knowledge Base

Get all the help you need here.

Navigation and Page Links

Posted 04th October, 2018

Wordpress posts and pages are stored in the database. When a visitor loads a specific page, the relevant content is requested from the database.

Permalinks and Navigation Explained

Wordpress supports ugly and pretty links, which it terms permalinks.

Pretty links can be enabled as follows:

  1. Ensure mod_rewrite is enabled on the server. This should be as simple as having the default Wordpress .htaccess file added.
  2. Log in to the Wordpress Admin area
  3. Navigate to Settings, then Permalinks.
  4. Update the link settings and save.

Navigation Broken

The navigation should be generated automatically from the link settings and pages created. Errors can be caused by the following:

Dead Links

Links may be have been hardcoded into a theme or post. If this is in the main navigation, it can be fixed as follows:

  1. Log into the Wordpress admin area
  2. Navigate to Appearance > Menu > Edit
  3. Correct or remove the old URL

Styling Broken or Menu Blank

If the Styling on the menu is not displayed correctly, this could be a result of a couple of things.

  • Ensure navigation is enabled in the Wordpress admin area under Appearance > Top Menu and Appearance > Header Menu.
  • An issue with header.php in the theme file. The simplest solution is to roll back the theme to a backup using Fixed.net. Alternatively the theme could be reinstalled or changed.
  • A plugin may have been used to create the menu. This plugin can be disabled to revert to the Wordpress default navigation, or a reinstall could be attempted.

All pages return a 404 not found

If the only workable page on a site is the home page, and all other pages return a 404 not found, then it is likely the .htaccess file is broken.

A .htaccess file sets rules that a server should follow when serving files. The Wordpress .htaccess rules tell Wordpress that - no matter what URL is requested - the default index.php file should be loaded instead. This enables Wordpress to then query the database based on the actual URL requested and return the desired content.

The default Wordpress .htaccess content is as follows:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Useful links

Permalinks in Wordpress - Official Documentation