Our Blog

Check out our links from the field. Looking for a specific topic? Use our filter links here:

menu_items

Cleaning Up WordPress Admin Menus

As a WordPress developer, I often find myself tasked with building very specific WP themes. So specific in fact, that I end up leaving out a lot of the default functionality. The problem is, I want the client to have a seamless experience while dealing with the back-end of their site. I don’t want them wondering what the Comments tab does, or why the Posts tab brings them to an empty list, because maybe their site didn’t require those options.

So, what to do? Well, hide them. Hiding unused menu tabs is a quick and easy way to de-clutter the back-end of your WordPress site. WordPress 3.1.0 introduced two new ways of doing this: remove_menu_page and remove_submenu_page.

The example below shows how you would remove the Comments menu item, by pasting this code in your functions.php file:

	add_action( 'admin_menu', 'my_remove_menu_pages' );

	function my_remove_menu_pages() {
		// the parameter is the slug of the menu item to be removed
		remove_menu_page(‘edit-comments.php’);
        }

But what if you want to remove more than just the comments? That the easy part, just call remove_menu_page() again, inside the function, passing the menu item’s slug as the main parameter.

That works great for top-level menu items, but what if we want to remove sub-menu items? That’s where remove_submenu_page() comes in. The example below shows how you would remove the Editor sub-menu item, by pasting this code in your functions.php file:


add_action( 'admin_menu', 'my_remove_sub_menu_pages' );

	function my_ remove_sub _menu_pages() {
		// the first parameter is the slug of the top menu item to be removed
		// the second parameter is the slug of the sub-menu item
		remove_submenu_page( 'themes.php', 'theme-editor.php' );
        }

Again, you can call this as many times as you’d like, to remove even more sub-menu items.

support

It’s Greek To Me: Learning To Customize Your WordPress Site When PHP And CSS Is Foreign

People are drawn to WordPress as a CMS because it’s a solution that anyone can implement without a lot of technical knowledge. I set up my first WordPress site in 2009, and since then I’ve learned a lot about how to start just a basic site with the default theme and no plugins and make it a totally unique, customized website – even if you don’t know how to write a single line of code.

The easiest way to hone the default look of WordPress into a site that reflects your vision, is to leverage the existing tools that have been built by the amazing WordPress community.

Think about the purpose of your site and head on over to WordPress.org. You can find a theme that pulls the important elements into the spotlight. Searching by subject – photography, business, portfolio, journal – is the best place to start. It might be tempting to search by style elements, but it’s so much easier to change the color of the homepage than the layout!

A good theme can get you nearly all the functions you need to launch your site, but even the best might not have that one tool you really need. That’s where plugins come in. You can make slick contact forms, detailed events lists, sell your band’s MP3s, support your site through managed ad campaigns, or even reach a whole new audience.

If you’re like me, after a bit of tinkering, you start to feel confident and want to check out that little area of your site’s admin labeled ‘Editor’. If you’re ready to get your hands dirty you can’t be afraid to break things. The best way to start is to back up your data. You can use any of the backup plugins available or make a copy of the theme folder (if you know how to use an FTP client or if your hosting provider has an interface for you to browse your files it will be in the wp-content/themes area).

If you’re feeling especially adventurous, you may want to review this article on debugging. This will be important information to have if you need to search for help later on.

Now that you have something to roll back to in case your experimenting goes all pear-shaped, start trying things out! Use some of these free resources online to help you navigate the PHP and CSS that runs WordPress.

At this point you’ve either discovered your hidden talents (hopefully) as a front-end web developer, or you’ve realized you need a hand. The WordPress community is there for you if you experiment yourself into a corner. You can get help online at WordPress.org, or look for meetups or user groups in your city.

Get in there and get your site online! Even if you don’t know where the <head> tag goes, you can create your own unique online presence.