WordPress Issues

WordPress issues pop up from time to time. And the solutions are not always that simple to fix. However here is a selection of WordPress errors and some tips to try to fix.

If the below guides are unable to fix your problem, then be sure to post your problems on the WordPress Forums.

Jquery not loading in Admin Dashboard

If you are finding that inside your WordPress dashboard you see the following functionality failing:

  • left side dashboard menu submenus were not displaying on hover
  • incoming links, blog, plugins feeds etc not loading
  • some buttons not responding in the dashboard

then you may have an issue with plugins that use Jquery scripts not working. One common reason for this problem occurs in WordPress 3.5 and is due to a change in the way WordPress loads these scripts in the Admin section.

A simple workaround that can fix this is to add a line of code into your wp-config.php file:

define(‘CONCATENATE_SCRIPTS’, false);

This needs to be added before this line:

if ( !defined(‘ABSPATH’) )
define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

Checking for Jquery errors

If something on your WordPress site doesn’t seem to be working properly, for example you click on a toggle and it doesn’t open or close, then this could be a Jquery related issue.

To debug, start by opening your website in Chrome. Now view Developer Tools > Net > Scripts and reload your page.
Now look for errors and warnings. If you see a warning that says something about “Uncaught TypeError” then this could be the cause of your problem.

The following needs to be addressed:

  • View page source to ensure that the javascript file that is using Jquery appears on the page
  • Ensure that “call” to load the js file occurs after the “call” to load Jquery js
  • Make sure you don’t have a second “call” to load Jquery js again, after loading javascript files
  • If using minified cached js file, eg when using W3TC, use the /wp-includes Jquery js file

Use Chrome check again to ensure your scripts are now loading properly.

WordPress Admin can sometimes cause issues and not show correctly, or even not show at all.

A quick series of steps to fix problems with the WordPress admin bar, especially after WordPress updates, when something goes wrong:

  1. WordPress Admin bar needs the wp_footer, so ensure that the active theme has wp_footer in the active theme’s footer.php file, just before body close tag
  2. Also important is that wp_head is called in the active theme’s header.php file just before head close tag
  3. If you recently updated WordPress, then you may have corrupt wp-admin or wp-includes folder files. To ensure files have been correctly overridden, download a fresh copy of WordPress (the version number that you just updated to), then extract folders and files. Next FTP the wp-admin folder and the wp-includes folder to the correct location on your websites files
  4. Check for javascript errors on the troublesome pages
  5. Check that /wp-includes/css/admin-bar.css is referenced correctly in the source code of the problem/affected page(s)
  6. Check the source code for any errors, especially meta title, meta details, title tags and other links throughout the page. An example of an error that can cause problems, is if you have used double quotes in page titles, which causes code errors.
  7. If using a CDN now re-upload the wp-includes folder to your CDN, to ensure that the CDN has the necessary files.
  8. Clear all caches
  9. Test

Your theme uses HTML5 and when viewing in Internet Explorer 8 or IE7 there are missing images and page elements.

HTML5 is a markup language used for structuring and presenting content for the World Wide Web. It is the new standard and is being used in new websites and web applications. Unfortunately however, many older browsers are still widely used and do not support this new html.
If you are using IE7 or IE8, you may notice that certain web page elements are not displaying correctly, background images may not be showing up, or your page may not look good at all!

Thankfully, thanks to HTML5Shiv, invented by Sjoerd Visscher, we can use this javascript workaround to enable styling of HTML5 elements in versions of Internet Explorer prior to version 9.

So if your theme uses HTML5 and you need to display elements that are not supported in earlier versions of IE, such as < header > , < footer > and < section > elements, then try adding the following conditional code into the < head > section before your stylesheets are loaded:

<!–[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>

For more information see: https://en.wikipedia.org/wiki/HTML5_Shiv