How to Remove the Links Menu Item from the WordPress Menu

Many sites and some blogs do not use the Links Manager tool in WordPress, especially those using WordPress as a Content Management System. If that is the case, you might want to remove the Links menu item from the admin area of the site altogether.

How do I remove the Links menu item from the WordPress admin?

Place the following code in the functions.php file of your active theme:

<?php
	add_action( 'admin_menu', 'mytheme_remove_menu_pages' );
	function mytheme_remove_menu_pages() {
		remove_menu_page('link-manager.php');
	}
?>

The above code will remove the Links menu item from the WordPress admin. For more information on how you can use this action to remove other menu items, see the WordPress Codex on remove_menu_page().

How to Define HTML5 DOCTYPE for IE

Is Internet Explorer not recognizing your <footer> tag?

I ran into the same issue.

Solution:

To ensure browser recognition of the most common HTML5 tags, you need to declare to the HTML5 DOCTYPE in you code. To do so add the below DOCTYPE just before your <html> tag.

<!DOCTYPE html>

A simple adjustment that may keep you from banging your head in Internet Explorer 9.

Solution to MySQL error #2006 in XAMPP

I recently ran into the MySQL error #2006 when importing a MySQL database into XAMPP for testing locally.

Error 2006: MySQL Server has gone away.

My research led me to understand this error occurs when your MySQL connection times out while waiting for a response.

After a few Google queries I found the solution for my MySQL error #2006 to be in editing the my.ini for MySQL in XAMPP.

Steps for MySQL error 2006 solution:

  • Edit the “my.ini” file found at “:\xampp\mysql\bin\”.
  • In the my.ini file, edit the “max_allowed_packet” by increasing the value.
    • XAMPP default value is 1M. I updated it to 10M.
  • Save the my.ini file.
  • Restart your MySQL and Apache server in XAMPP.

This solution worked for me. Hopefully it may helped another soul stumped by a pesky 2006 MySQL error code in their local XAMPP environment.