in Plugins & Tutorials

Simplifying ‘My Sites’ toolbar menu in WordPress multisite

The WordPress Toolbar saves me time daily with useful links as I jump around dozens of WordPress sites editing posts, pages and settings. But as a Super Admin on a multisite installation with hundreds of blogs and websites, I realized it also started costing me time soon after the network was created.

Because my Super Admin account is the site admin on 206 sites and counting, the “My Sites” menu in the toolbar was loading links to those sites on every page load. It got to the point where I would watch the page load get to the “My Sites” dropdown, see it hang for a several seconds while it generated the list, and then finally load the rest of the toolbar.

While one approach to fixing this could be limiting the number of sites loaded in “My Sites”, for my purposes (and those of my Super Admin colleagues) it was best just to swap all those links out for a few network admin links used the most: the “My Sites” page, the Network Dashboard, the Network Sites page and the Network Users page.

Here are the two functions used to remove “My Sites” for Super Admins and then add back in a menu with just a few useful links (this snippet has been tested on WordPress 3.4.2):

Read on…

in Design & Dev & Plugins

Theme options plugins & frameworks for WordPress

There are many posts on the interwebs about how to use the WordPress Settings API to create theme options for your WP project. If you find these all too intimidating and time-consuming, there are a number of plugins and scripts to make the task easier:

WordPress AdminPage Class

AdminPage Class WordPress Theme Options

I have used Markus Thömmes’ WordPress AdminPage Class for a few projects. Back when I needed it, it was the most attractive alternative I could find to building my own page from scratch.

The AdminPage Class was easy to implement. Following the documentation, you simply include the script in your functions.php file and then pass arguments for a variety of objects. You can see an example in my Design Presenter theme functions file.

The script supports the following headings and fields with styles true to the WordPress admin:

  • Headings
  • Subheadings
  • Paragraphs
  • Inputs
  • Textareas
  • Checkboxes
  • Radiobuttons
  • Dropdowns
  • Uploaders
  • Sliders
  • Datepickers

There are a few caveats though: The class has not been updated since 2010 (but it is still functional with WP 3.3.1), it doesn’t pass the Theme-Check plugin so a theme using it will probably not pass theme review to appear in the official Theme Directory, and it’s $8 or $40 depending on the license you purchase.

AdminPage Class

Options Framework Plugin

Theme Options Framework Plugin for WordPress
If spending money is not an option or you need more complex setting types (like image radio buttons or a color picker), then the Options Framework Plugin might do the trick. This popular plugin is available for download from the official Plugin Directory and a theme containing examples of using each option type is available from the plugin author, Devin Price.

Though I’ve yet to use the Options Framework Plugin on a production project, based on recent tinkering it provides a solid foundation for creating functional and attractive theme options pages. It’s also been forked into Jeff Parsons’ Theme Options Panel Framework, which was last updated 11 months ago so I would stick with the more frequently updated Options Framework Plugin.

Options Framework Plugin

Read on…

in Design & Dev & Themes & Tutorials

Displaying custom post types with the same custom taxonomy value

Recently I was working on a WordPress theme where I wanted to be able to display a list of posts from a custom post type (specifically a milestones post type) that shared the same custom taxonomy value (in this case, a project ID) as the current post.

Not being a programmer, I struggled for far too long to write a buggy and obese query that would never do. After extensive searching, I came across Automattician Michael Fields’ solution on WP Questions. Since it wasn’t the easiest thing to find, I’m sharing it here with comments for easy adaptation to your purposes:

Read on…

in Showcase

6 presidential candidates use WordPress as their CMS

Matt Mullenwegg’s State of the Word address this weekend at WordCamp San Francisco shared some impressive numbers about WordPress. For instance, 14.7 percent of the top million websites in the world use WordPress.

Matt’s presentation also revealed numbers from a survey of 18,000 WP users, including that 92 percent of those surveyed use WordPress as a CMS.

It turns out presidential candidates use WordPress as a CMS too.

While browsing the 2012 Republican candidates, I noticed WordPress is the CMS of choice for presidential campaign websites (six out of the 10 declared Republican candidates) and every single candidate is using an open source content management system (Drupal powers the rest).

Maybe there is hope for us after all…

Michele Bachmann – WordPress

Michele Bachmann's WordPress website

The U.S. Representative from Minnesota and winner of the Ames Straw Poll sports a rather garish WordPress-powered site.

Herman Cain – WordPress

Herman Cain WordPress website

The former CEO of Godfather’s simple but elegant website is powered by WordPress.

Read on…

in Showcase

10 HTML5 news projects

HTML5 logoWhile HTML5’s specification won’t be finalized for more than three years (check out Is HTML5 Ready Yet? for the countdown and take a look at the source code), news organizations have been experimenting with it for awhile now. Besides making their videos iPad friendly, quite a few media giants have made standalone HTML5 projects.

These projects tend to mimic tablet-like experiences with horizontal grid layouts and large clickable blocks. This is for good reason, given that publishers could save a lot of money developing just one HTML5 site for mobile rather than a bunch of native apps, which haven’t been very lucrative yet. But for now, Google’s mighty Chrome browser (what every journalist should use—more on this in a later post) delivers the best HTML5 experience.

While these experiments are all strikingly refreshing ways to read online, they don’t seem to have much attention from their creators or readers. I’m curious how many people visit publishers’ HTML5 projects over their standard homepages.

Here are 10 HTML5 projects worth a peek:

1. New York Times Skimmer

New York Times Skimmer HTML5
The Gray Lady’s HTML5 site delivers a surprisingly print edition-like experience, with stories wrapping in three columns complete with indents and the occasional display ad. Click on the Customize button for some delightful layout options, or learn the easy keyboard shortcuts for quick browsing. Try as I might, I still prefer visiting that classic homepage or coming to articles via Twitter. For those looking for a pleasant way around The Times’ paywall, the Skimmer will not attack you once you hit 20 stories in a month.

2. AP Timeline Reader

AP Timeline Reader HTML5
The Associated Press’ HTML5 Reader has a nifty feature that allows you to skim through and save the stories you want to read in the queue. The page layout is a horizontal timeline of recent days with stories mapped along it. You can add and remove stories from classic sections like Politics and Sports by toggling their tabs on the left. The AP’s Reader makes heavy use of transitions and animations in the interface for a flashy—and gaudy—reading experience and also fails to generate links to stories, making it impossible to share stories from this interface. Dumb.

3. NPR HTML5 Web App

National Public Radio’s Web App separates content into three rows with sliders for finding more stories. Like AP’s Timeline Reader, NPR’s HTML5 site allows you to add stories to a playlist where they’ll play one after the other. While you’re listening to some stories, you can enjoy reading news briefs inside a very minimal reading window, again sliding between panes for more stories.

Read on…

in Design & Dev & Themes

Using WordPress for microsites, small projects

Pittsburgh Post-Gazette PipelineWordPress is not a catch-all solution for news organization’s websites, but it is an excellent candidate to power small projects or microsites dedicated to big stories.

For an example of an excellent news microsite, one needs not look any further than the Pittsburgh Post-Gazette’s Pipeline, which was profiled by Justin Ellis over on Nieman Lab. Pipeline is powered by Joomla, but could have just as easily (or easier) have been powered by WP.

The microsite format allows the Post-Gazette to gain an intensely interested audience like a blog does. The content is more engaging than typical stories, and because the focus on Marcellus Shale developments is pure throughout, readers are less likely to be deterred by other content they find irrelevant. The format also encourages contributions from collaborating hyperlocal publications and readers themselves.

WordPress offers the ability to build a network of these sites simply and quickly, with plugins contributing added extra functionality when necessary.

Read on…

in Tools

Is media consumption killing your production?

Xoom Kindle FascinateThe other night as I went to bed with my Xoom tablet in hand, I also picked up my smartphone and my Kindle. For a moment, these consumption devices were all stacked neatly on my nightstand, ready for my final quiet hours of feed reading, tweet scanning and book reading.

As I looked at that marvelous stack of gadgets, It hit me that as much as I enjoy those devices, they’ve been sucking my production in many areas of life dry.

For instance, they played a part in why I haven’t posted to this blog in 69 days.

To clarify, I’m not talking about productivity but creation of my own work (whether it’s photos, WordPress themes, blog posts or a garden).

These consumption tools are mostly productive because they do enable me to learn tons on a daily basis. They provide avenues to connect with others and share snippets of what I’m thinking or reading too. But it’s so easy to get lost in consuming information from them while producing very little of anything that’s my own, whether digitally or physically.

I’m still looking for a tool/service/method that allows me to get the most out of media while managing my time so that I create things too. So far a variety of services and tools have only sucked me deeper into trivial details I never would have thought twice about before.

Are you struggling to create in this consumption-heavy world? Worse yet, are we discouraging creating with consumption culture?