I am starting off a series of interviews with Andrew Norcross. I met him in 2010 at the Search and Social Conference in Tampa. He is a really nice person, extremely intelligent and very focused. He has always been willing to help out SEO’s and has recently become the Senior WordPress Developer at BlueGlass. I […]

Follow SEJ on Twitter @sejournal





The Web Development Series is supported by Rackspace, the better way to do hosting. Learn more about Rackspace’s hosting solutions here.

Self-hosted WordPress users, get your update engines running: WordPress 3.3 is now available.

The culmination of five months of hard work, WordPress 3.3 offers a number of new updates and tweaked features.

The first of these is a redesigned dashboard, which features menus and toolbars that are more cohesive and easier to maneuver on smaller screens.

WordPress 3.3 has also added call-outs and pointers for new users, as well as better contextual help. The media manager, a long-standing point of pain for the CMS, has received an upgrade and now supports drag-and-drop file uploading. Let’s hope a more robust management and search system appears in future releases.

SEE ALSO: WordPress 3.3: The 11 Most Important New Features

As WordPress matures, releases become less about breakout features, and more about refining what already works and improving the backend for developers.

On the developer side, there is a new editor API for better integration with the core WordPress post and page editor, as well as updated versions of jQuery and jQuery UI.

I’ve already updated most of my personal sites to WordPress 3.3 and enjoy the new admin toolbar and the layout of the side navigation menus. Let us know your thoughts of WordPress 3.3 in the comments.

1. Redesigned Admin Bar

The redesigned admin bar brings a handful of strategic enhancements.

There are less links/elements shown, and the ones that remain are carefully placed for a reason. The search box and appearance menu were removed, and the user menu moved to the right side, similar to Google’s user bar.

By making it a shade darker and bolder, the admin bar is now more prominent in the WordPress back-end.

Click here to view this gallery.


Series Supported by Rackspace


rackspace

The Web Development Series is supported by Rackspace, the better way to do hosting. No more worrying about web hosting uptime. No more spending your time, energy and resources trying to stay on top of things like patching, updating, monitoring, backing up data and the like. Learn why.

More About: WordPress

For more Dev & Design coverage:





Embeddable Tweets

Along with Twitter’s redesign announcement Thursday, the service has rolled out a new way to let website developers and bloggers embed tweets that give visitors the ability to reply, retweet and favorite without leaving the page.

Twitter users now can place embeddable tweets on their websites by simply using one line of code. A single-click action also lets visitors follow the creator of a tweet.

Here’s an example embedded tweet from my Twitter account:

“Try it on your website by clicking ‘Embed this Tweet’ from any permalink page in the newly launched Twitter,” Twitter’s Brian Ellin said in a blog post that provides an example of an embedded tweet. “If you use WordPress or Posterous Spaces, it’s easier than ever to embed Tweets.”

The “Embed this Tweet” link will lead users to these customization options. Users can then copy and paste the markup for use on their websites. I clicked centered for my embedded tweet, which you can play with above.

For full instructions, click here, where you can also learn how to render the tweets using oEmbed.

Twitter also introduced new methods to distribute the recently revamped tweet, follow and hashtags buttons.

“The new #hashtag button tells your visitors there’s an interesting conversation happening on Twitter, and lets them join in with just one click,” Ellin wrote. “The @mention button encourages visitors to Tweet to your account, driving public conversation directly from your website.”

How useful do you think these changes will be for website owners?


Mashable’s Complete Coverage of Twitter’s Redesign


More About: posterous, Twitter, Web Development, WordPress

For more Dev & Design coverage:





Brian Casel is the founder of CasJam Media, a web design shop that works with clients worldwide designing custom WordPress CMS sites. Connect with Brian on Twitter @CasJam.

For those of us who work with WordPress every day, it has been exciting to watch our beloved content management system evolve over the years from a blogging tool into a web publishing powerhouse.

Today we take a look at the all new WordPress 3.3, which after months of beta testing, is expected to be released in late November.

SEE ALSO: Top 4 Ecommerce Tools for WordPress

Compared to the milestone WordPress 3.0 release — which introduced important new functionalities, such as custom post types and built-in multisite mode — version 3.3’s improvements may seem less groundbreaking. But, in fact, the impact of this release may be felt by more people than ever.

Most of the improvements are aimed toward improving the user experience for all users, not just those of us building WordPress websites. Your clients will immediately see the changes in 3.3, which are bound to improve their experience too.

Here are the major improvements coming to WordPress 3.3.

1. Redesigned Admin Bar

The redesigned admin bar brings a handful of strategic enhancements.

There are less links/elements shown, and the ones that remain are carefully placed for a reason. The search box and appearance menu were removed, and the user menu moved to the right side, similar to Google’s user bar.

By making it a shade darker and bolder, the admin bar is now more prominent in the WordPress back-end.

Click here to view this gallery.


Other Noteworthy Improvements in WordPress 3.3


Now that we’ve covered the most visible improvements, here are some under-the-hood enhancements, particularly of interest to developers.

  • Responsive Layout: This is really just setting the groundwork for a fully responsive layout, which is expected in version 3.4. But in WordPress 3.3, the left side menu automatically collapses on smaller screens.
  • Postname Permalinks: Before you had to set /%postname%/ as your custom permalinks setting, but now it’s a selectable option. More importantly, performance issues have been fixed, so this setting is now usable for sites that have a large number of posts and pages.
  • jQuery 1.7 and jQuery UI 1.8.16: Updated jQuery and now the full jQuery UI toolset are now packaged and ready to be enqueued in WordPress 3.3.
  • WordPress Editor API: Plugin developers can now customize the post editor, including the TinyMCE buttons. You can even add additional editors.

  • Get Updated!


    As always, it’s recommended to get your sites updated to the latest version of WordPress as soon as it’s available, so keep an eye out for the release, and get ready to start digging into these great new features!

    More About: contributor, features, Tech, trending, upgrades, Web Development, WordPress

    For more Dev & Design coverage:





Brian Casel is the founder of CasJam Media, a web design shop that works with clients worldwide designing custom WordPress CMS sites. Connect with Brian on Twitter @CasJam.

Remember when WordPress was used only for blogging?

Even all of the talk about WordPress being a true CMS seems to be old news these days. Therefore, make way for latest phase of WordPress’ evolution: ecommerce.

If you’re selling products online, you need to take a serious look at WordPress as your platform for ecommerce. Third party shopping cart plugins for WordPress are not so new anymore. They’ve been slowly developing and evolving within the WordPress community for years. Today, ecommerce on WordPress is ready for prime time.

Before we get into which WordPress shopping carts you should consider using, let’s talk about why it’s a good idea to integrate your CMS and shopping cart together under one roof (WordPress).


Clean Integration of Your CMS and Your Shopping Cart


Gone are the days of running two separate systems on your website: one for your marketing site/blog and another for your online store. By fully integrating your shopping cart with your WordPress CMS, you have complete control to cross-promote your products with other site content.

For example, your homepage might be used to promote “hot” products as well as your latest blog headlines. You might want to announce a flash sale in your homepage slider and carry that callout through the rest of your site using global WordPress widgets.

From an administration standpoint, you (or your client) only need to use one login for one system to manage everything in the operation. Plus, it’s easier to view and measure your sales funnel when your analytics tool tracks a single website.


Seamless User Experience for Your Customers (and Your Developer)


How many times have you experienced this? You land on the beautiful homepage of some business. They have an appealing design, strategic and friendly marketing copy and an overall positive user experience. So far, you like what you see, so you click the link labeled “Store.”

Suddenly, you’re taken to what seems to be a completely different website, with an outdated design and clunky customer experience. Your impression of the website, and in turn, your opinion of this brand, has taken a turn for the worse. Now you’re not so sure about buying its product.

A fully integrated shopping cart system built into your WordPress site ensures that customers experience the same design and quality from homepage to checkout.

For developers, it means not having to fiddle around with two different systems, “faking” integration by closely matching two stylesheets, or making updates in two places each time. Integration means one codebase, centralized functionality and easy maintenance.


Top 4 Ecommerce Tools for WordPress


The following are just a few of the more popular systems out there, and new ones are popping up all the time, particularly as the WordPress community continues to expand.

As you can see, the ability to sell products on a WordPress site has come a very long way. With all of the amazing plugins and frameworks that have been developed in this space, ecommerce on WordPress certainly deserves real consideration for any new online store project.

1. WooCommerce

Just last month, WooThemes released its ecommerce framework, WooCommerce. This is arguably one of the most comprehensive shopping cart solutions available for WordPress. It originated as a fork of the popular Jigoshop plugin, and offers a host powerful features including multiple product types (simple, configurable, downloadable, etc.), inventory management, comprehensive shipping and tax options, marketing tools and powerful reporting features. The admin user experience is powerful yet easy to use. Like everything from Woo, it can be as simple or as complex as you want it to be.

Click here to view this gallery.


The Bottom Line


As you can see, the possibility of selling products on a WordPress site has come a very long way. With all of the amazing plugins and frameworks that have been developed in this space, ecommerce on WordPress certainly deserves real consideration for any new online store project.

More About: BLOGS, contributor, ecommerce, features, Web Development, WordPress

For more Dev & Design coverage:


Not very long ago when we were planning the launch of our humble magazine BuildMobile, which you are reading right now, the content strategy included coverage of the nebulous WebOS mobile operating system. Come launch time, there wasn’t enough traction to include it in our platform categories, but we were hopeful for the future. WebOS in 60 Seconds WebOS is a mobile operating system based on the Linux Kernal Initially developed by Palm and first released in January 2009 Acquired by Hewlett-Packard in April 2010 for US$1.2b WebOS uses a “card” UI with a left-to-right flick for app swithcing, flick up for “off” The WebOS broswer, called simply “Web” is based on the WebKit layout engine WebOS “Synergy” feature integrates information from many cloud services into a single list Devices include the Pre , the Pixi and the Veer phones, then the HP TouchPad HP announced in March 2011 that WebOS would run within Windows by the end of 2011 On 18th August 2011 HP announced it would discontinue operations for WebOS devices Potentially even more HP TouchPads will be made and sold at a loss Web Standards based Native Apps A feature that was full of promise, and partly responsible for the underdog adoration WebOS attracted from developers worldwide, is that web technologies like HTML, CSS and Javascript are first class tools for developing native apps for the platform, with full access to hardware APIs like the camera.

Link:
BuildMobile: The Future of WebOS




Already using Google+? Follow Mashable’s Pete Cashmore for the latest about the platform’s new features, tips and tricks as well as our top social media and technology updates.

This month’s hot topic has been, without a doubt, Google+. Whether the new social service from the world’s largest search company will be a “Facebook killer” remains to be seen, but one thing’s for certain: This is one social network you don’t want to ignore.

When it comes to getting found, Google+ is fast becoming a great asset for bloggers and content producers thanks to its ever-expanding user base and simple sharing tools. In this post, we’ll show you a few ways to start spreading a little of that Google+ love on your WordPress-powered website.


Display Your Google+ Profile Information


google card imageSoftware developer John Henson from PlusDevs has developed a handy, easy to use WordPress widget that displays your Google+ profile on your blog. The setup is quick and simple: Install the plug-in and drag the widget into your sidebar. Just fill out the form and you’re done.

You can also incorporate the widget into your template with only a few lines of PHP code, giving you the flexibility to place it anywhere within your layout.

You can learn more about the widget in the official blog post or jump straight to the code on GitHub.

Unofficial Google+ user tracking site SocialStatistics.com also offers an embeddable Google+ widget. Simply add your profile to their database and grab the widget code from your page on their site.


Add the +1 Button


If you’re not already using the Google +1 button, consider taking a moment to add it to your site. This is a great way to let users save, promote and find their favorite content. The +1 button only takes a few minutes to integrate with your site and works with any Google profile. While this isn’t a Google+ specific feature, we wouldn’t be at all surprised to see it integrated with the service. Either way, it’s another great way of adding an additional avenue for promotion and sharing.

You can learn more about the +1 button from Google.

To add it to your WordPress site, you can either use the official +1 button code generator from Google or take a look at the myriad +1 button WordPress plug-ins available.


Use a Google+ Inspired Theme


Do you love the look of Google+’s clean, intuitive layout and unobtrusive interface? For the die-hard fan (or, hey, maybe you run a blog that’s centered around the service), there are already a few Google+ inspired WordPress themes for your perusal.

WP Plus

wp plus image

WP Plus is a fixed-width, 3 column Google+ inspred WordPress theme supporting custom content menus, styled sticky-posts and valid XHTML/CSS code. Clean, fast-loading and SEO optimized, WP Plus gives your blog the Google+ look and feel in just minutes.

PlusOne

plus one image

Similar to WP Plus, PlusOne is another 3-column, fixed-width Google+ styled theme that supports custom WordPress menus. It’s a clean and well-designed theme, but it does take some liberties with how it translates Google+ to WordPress (so it doesn’t look quite as accurate to Google’s own design).

Reflex+

reflex plus image

Reflex+ shares all of the features mentioned in the above two theme but it also brings in jQuery and incorporates AJAX for some tasks, such as the “read more” post navigation, helping it appear more fluid and seamless.


Want More?


Google+ is still a relatively new service locked behind an invite-only registration system. No doubt as time progresses and the service grows, there will be more options for publishers. Right now there are a couple of options if you’re a developer interested in having a go at creating your own Google+ plug-in.

If you’d like to gain access to the official Google+ API, you’ll need to sign up with Google to register interest in a Google+ developer account. Unfortunately, the API is not yet public. It’s unclear whether this will change as the service matures, but inquiring about developer access is certainly worth looking into if you want serious Google+ integration and sharing between your site and the service.

For a more portable (and presumably trimmed-down) solution, software developer Jason Striegel has put together a collection of PHP utilities for a locally-hosted Google+ API service. In its current state, the API will allow you to retrieve post and profile data and post to Google+. You can check out his code on GitHub. This is a great option to include within your own distributed code, such as WordPress plug-ins and widgets.


More About: dev, Google, Google Plus, WordPress

For more Dev & Design coverage:

The Web Development Series is supported by Rackspace, the better way to do hosting. Learn more about Rackspace’s hosting solutions here.




wordpress image

Self-hosted WordPress.org users got a nice surprise on Independence Day with the release of WordPress 3.2, “Gershwin.”

WordPress 3.2 is the fifteenth major WordPress release in the project’s eight-year history. The focus in this release was to make things faster, lighter and more streamlined.

We’ve spent some time with WordPress 3.2, both in its various betas and in the final version, and put together this guide to what’s new, improved and enhanced.


1. New Minimum Requirements


One of the larger technical changes in WordPress 3.2: This release officially drops support for older versions of PHP and MySQL. The new requirements mean that PHP 4 and MySQL 4 will no longer be supported.

This is a good thing. PHP 5 and MySQL 5 have both been available since 2005, and WordPress is actually one of the last major pieces of web software to drop support for the old versions. Even though WordPress 3.2 doesn’t actually do anything that requires PHP 5, this is the first step in that direction. Moving to PHP 5 and MySQL 5 means that future versions of WordPress can be lighter, take advantage of more new features and be better optimized for performance.

The new basic requirements are PHP 5.2.4 and MySQL 5.0. The popularity of WordPress and the fact that the team made the announcement of the switch a year in advance means that most major hosts who weren’t already running newer versions of MySQL and PHP have had a chance to upgrade.

You can find out if your web server meets the minimum requirements by installing the Health Check plugin from the WordPress directory. It simply tells you what versions of PHP and MySQL you are running and lets you know if that is appropriate for WordPress 3.2.


2. Goodbye, IE 6


In a similar vein, WordPress.org is following in the footsteps of WordPress.com and dropping support for IE 6. Supporting IE 6 has long been a struggle for the UI team — many of the new features and additions just don’t play well with the aging browser.

You can load the WordPress dashboard in IE 6 but it won’t look good or be very usable. For corporate users who are still forced to use IE 6 at work, use this as yet another opportunity to convince the bean counters to move away from IE 6 and onto modern browsers like Google Chrome, Firefox, Opera, Safari or IE 9.


3. New Default Theme


One of my favorite features in WordPress 3.2 is the new default theme, Twenty Eleven.

When WordPress 3.0 was released last year, it came packaged with a brand-new default theme, Twenty Ten. At the time, the WordPress Theme Team said the goal was to introduce a new default theme every year.

Twenty Eleven is the spiritual successor to the Duster theme for WordPress.com and WordPress.org users. Duster was developed by the gang at Automattic (the people behind WordPress.com) and it was a visually and technically impressive theme.

Twenty Eleven has taken the work on Duster and improved it, making it more stable and robust. Visually, the theme is clean and modern and it supports responsive layouts, which means that the same website will look great on a phone, an iPad or desktop monitors of varying sizes.


4. Distraction Free Writing Mode


The big “shiny” feature in WordPress 3.2 is the addition of a new distraction free writing mode. When users enter the fullscreen mode of the WordPress post editor, they are now treated to a new writing mode that aims at cutting down on distractions and making it easier for users to “just write.”

It’s a nice feature, particularly for users who like to spend a lot of time on their prose and don’t want to be distracted by sidebars, menus and options. Plus, the feature is smart enough to still allow users to access various parts of the publishing interface.


5. Redesigned Dashboard


Visually, the backend WordPress interface has received an overhaul. This is the first major user interface change since WordPress 2.7 was released in 2008. The new interface is cleaner, more streamlined and the interface has been lightened up.

The changes are subtle, but the overall effect, at least for me, is something that looks more professional and more polished. WPCandy has put together a full before and after gallery highlighting the interface changes.

You can also check out our gallery from earlier this year that walks through the evolution of WordPress from 2003 through 2011.

WordPress 0.7.1

The first release of WordPress was unleashed onto the interwebs on May 27, 2003.

Check out the sparse backend/post page.

WordPress 1.0.1

WordPress hit 1.0 in January of 2004. The update included an improved installation process, a new default theme and a more robust backend.

WordPress 1.2

Released in May 2004, WordPress 1.2 introduced plugins, extending WordPress even further.

WordPress 1.5

In February 2005, WordPress 1.5 was released. It included new features like the ability to create pages, as well as posts and a new default theme, Kubrick. Kubrick would stay on as the default theme until 2010.

WordPress 2.0

On December 31, 2005, WordPress 2.0 was introduced to the world.

WordPress 2.0 featured a redesigned (and blue) admin, WYSIWYG editing and inline uploads.

WordPress 2.1

More than a year would pass before WordPress 2.1 would make its way to users in January 2007.

WordPress 2.1 included autosave for posts and drafts, a tabbed post editor and the ability to set any page as the homepage of a website.

WordPress 2.2

In May 2007, WordPress 2.2 was released. It introduced widgets to the WordPress world and kicked off a new, more frequent development cycle.

WordPress 2.3

WordPress 2.3 was released in September 2007. The big new feature in 2.3 was support for tags as well as categories. That may not seem that important in 2011, but at the time, it was a huge feature.

WordPress 2.5 Dashboard

In March 2008, WordPress 2.5 was released. A major user interface update, WordPress 2.5 brought about some major changes to the dashboard and post screen.

WordPress 2.5 Post Screen

Although certainly better looking than previous versions of WordPress, WordPress 2.5 was criticized for some as being “too different.”

The interface remained largely unchanged in WordPress 2.6, released in July 2008, but the backend would soon change again.

WordPress 2.7

In December 2008, WordPress 2.7 became available. For the second time in less than a year, the user interface was completely revamped. This time, it was a hit.

WordPress 2.7 Post Screen

The overall interface remained largely the same from WordPress 2.7 through WordPress 2.9.

In the intervening 18 months, however, WordPress gained lots of new features and started to really round itself out as more than just a blogging engine.

WordPress 3.0 Dashboard

Released in June 2010, WordPress 3.0 was a major release for the platform.

Many of the new features, like custom post types and taxonomies have helped WordPress establish itself as a real, grown-up CMS.

WordPress 3.0 Post Screen

The post screen for WordPress 3.0 and 3.1 is customizable and modular.

WordPress 3.2 Beta Dashboard

The next major WordPress release, WordPress 3.2, is expected sometime in June 2011. This release features a revamped dashboard and post interface. It also marks the official end for support for Internet Explorer 6.

WordPress 3.2 Post Screen

WordPress 3.2 carries over many of the elements from WordPress 3.0/3.1, but with a more refined look and feel.

WordPress 3.2 Distraction Free Writing Page

One of the big new features in WordPress 3.2 is the introduction of the Distraction Free Writing mode. This mode allows the user to just concentrate on writing, without worrying about sidebars, modules or custom fields.

In some respects, the new writing mode harkens back to the earliest days of WordPress.

The Web Development Series is supported by Rackspace, the better way to do hosting. No more worrying about web hosting uptime. No more spending your time, energy and resources trying to stay on top of things like patching, updating, monitoring, backing up data and the like. Learn why.


More Dev & Design Resources from Mashable:


How the WordPress SEO Plugin Can Help Your Blog [INTERVIEW]
Closed or Open Source: Which CMS is Right for Your Business?
HOW TO: Get Devs to Use Your Company’s API
HOW TO: Get Started with the Less Framework
4 Free Ways to Learn to Code Online

More About: web development series, WordPress, wordpress 3.2

For more Dev & Design coverage:

547-wordpress-thumbnails

You may have noticed the “Featured Image” box when editing a post or page. It allows you to upload or select an associated image for the article. It generally appears as a thumbnail when viewing a list of posts, perhaps in a category index or search results.

Thumbnail support must be enabled within your theme. You could add it to a plug-in so it’s available to all themes but that may not be appropriate in every case. Therefore, you’ll need to open or create a ‘functions.php’ file within your theme folder (wp-content/themes/theme-name/).

To add thumbnail support for all post types, append this command somewhere after the opening <php:


add_theme_support('post-thumbnails');

Alternatively, you can enable thumbnails for just posts:


add_theme_support('post-thumbnails', array('post'));

or just pages:


add_theme_support('post-thumbnails', array('page'));

Setting Thumbnail Sizes

Default thumbnail sizes can be set in WordPress’s Settings > Media screen. However, you can also set a default height and width in functions.php, e.g.


set_post_thumbnail_size(100, 75);

This will produce thumbnails with 100px width and a 75px height (a pleasing 4:3 ratio). However, what happens when a user uploads an image with different aspect ratio — say 100 x 150? In this case, the whole image is proportionally reduced to fit the space and the resulting thumbnail is 50 x 75.

Alternatively, you can define hard-cropping by passing ‘true’ as a third argument:


set_post_thumbnail_size(100, 75, true);

This will crop the image so it matches the aspect ratio. The resulting thumbnail will always be 100 x 75, but the top and bottom or left and right edges will be removed.

WordPress Featured Image

The “Featured Image” box should now appear on your WordPress post/page edit screen. If it’s not there, check it’s enabled in “Screen Options” or review your functions.php code.

Using Thumbnails

Three main thumbnail commands can now be used within any WordPress loop. Typically, you’ll want to use them in files named index.php, category.php, archive.php, author.php, taxonomy.php or search.php:

  • has_post_thumbnail() returns ‘true’ if a thumbnail has been set
  • the_post_thumbnail() echos a string containing the thumbnail <img> tag
  • get_the_post_thumbnail() returns a string containing the thumbnail <img> tag

One of the simplest implementations is therefore:


if (has_post_thumbnail()) {
	the_post_thumbnail();
}

Or we could add a link and a default thumbnail if one isn’t available:


echo '<a href="', get_permalink(), '">';
if (has_post_thumbnail()) {
	the_post_thumbnail();
}
else {
	echo
		'<img src="',
		get_bloginfo('template_directory'), '/images/thumb-default.png',
		'" width="100" height="75" alt="thumbnail" />';
}
echo '</a>';

Advanced Thumbnail Use

Two optional arguments can be passed to the_post_thumbnail() and get_the_post_thumbnail(). The first is the size — either:

  1. a string containing the text ‘thumbnail’, ‘medium’ or ‘large’ as set in in WordPress’s Settings > Media screen, or
  2. an array with new width and height dimensions, e.g. array(120, 90)

The second is an associative array containing the src, class, alt and title.

For example:


the_post_thumbnail(
	array(120, 90),
	array(
		'src' => 'image.jpg',
		'class' => 'thumbnail',
		'alt' => 'post thumbnail',
		'title' => 'my custom title'
	)
);

results in HTML such as:


<img width="120" height="90" src="image.jpg" alt="post thumbnail" title="my custom title" />

That’s about as complex as it gets. Have fun adding thumbnail support to all your WordPress themes.

WordPress menu

In my previous WordPress posts we discovered how to create a plugin, change the administration panel branding, and remove unnecessary dashboard widgets and meta boxes.

In this post, we’ll make some fundamental changes to the main administration menu. If you haven’t created an initial plugin, please read the first part. Welcome back — let’s begin…

The standard WordPress menu can be a little daunting — and third-party plugins often add further items. You can restrict user roles so clients do not see all menu items but, unless you’re using every WordPress feature, they’ll still see options which don’t apply to their site.

We’ll create a function which removes redundant links and simplifies the experience for your clients. Here’s the full code which you can copy into easy-admin.php:


// remove unnecessary menus
function remove_admin_menus() {
	global $menu, $submenu;
	// main menus removed for all users
	$restrict = explode(',', 'Links,Comments');
	// sub-menus removed for all users
	$restrictsub = explode(',', 'Categories,Post Tags');
	// main menus removed for everyone except administrators
	$restrict_user = explode(',', 'Media,Profile,Appearance,Plugins,Users,Tools,Settings');
	// sub-menus removed for everyone except administrators
	$restrictsub_user = explode(',', 'Updates,My Sites');
	// WP localization
	$f = create_function('$v,$i', 'return __($v);');
	array_walk($restrict, $f);
	if (!current_user_can('activate_plugins')) {
		array_walk($restrict_user, $f);
		$restrict = array_merge($restrict, $restrict_user);
		array_walk($restrictsub_user, $f);
		$restrictsub = array_merge($restrictsub, $restrictsub_user);
	}
	// remove menus
	end($menu);
	while (prev($menu)) {
		$k = key($menu);
		$v = explode(' ', $menu[$k][0]);
		if(in_array(is_null($v[0]) ? '' : $v[0] , $restrict)) unset($menu[$k]);
	}
	// remove sub-menus
	foreach ($submenu as $k => $p) {
		foreach($submenu[$k] as $j => $s) {
			if (in_array(is_null($s[0]) ? '' : $s[0] , $restrictsub)) unset($submenu[$k][$j]);
		}
	}
}
add_action('admin_menu', 'remove_admin_menus');

The lines at the top of this function determine which menu items are removed:

  • $restrict (line 5) contains a comma-delimited list of main menu items which will not be shown to any users — including administrators. In the example above, we’re hiding Links and Comments since they’re not used in our site.
  • $restrictsub (line 7) contains a comma-delimited list of sub-menu items which will not be shown to any user. We’ve disabled Categories and Post Tags which normally appear in the main Posts menu.
  • $restrict_user (line 9) contains a comma-delimited list of main menu items which are hidden to everyone except administrators. The example above disables everything other than the Dashboard, Pages and Posts. (Non-administrators would not normally see Appearance and Plugins, but other plugins could change that functionality).
  • $restrictsub_user (line 11) contains a comma-delimited list of sub-menu items which are hidden to everyone except administrators. We’ve disabled Updates and My Sites which normally appear within the main Dashboard menu.

simplified WordPress menu

If you don’t want any items removed for a specific value, set it to an empty array, e.g. $restrict = array();

The result is a far simpler administration menu which is free of dangerous options which could confuse your clients.