Like the blog? Get the book »

Prefix Everything

Andrew Nacin:

Anything you create in the global namespace has the potential to conflict with a theme, another plugin (including one you wrote), and WordPress core itself. Thus, prefix everything with a unique-enough character set. For example, all functions I write always start with “nacin_”, and I make sure that my functions are unique across all of my plugins.

In this recent post, I used some fairly generic function names like custom_css_hooks. Andrew is saying that names like that are a little too generic and that it’s possible another plugin could use that same name which would be rather disastrous. Since it’s totally internal anyway, I should have called it digwp_custom_css_hooks, which would be far less likely to meet a conflict.

WordPress on Microsoft

Yes, it runs WordPress on Windows and SQL Server.

Editor’s note: 404 link removed.

Specify Unique CSS File Per Post

Specify Unique CSS File Per Post

I’m a HUGE fan of being able to link up a CSS file on a per-page basis. I just find it extremely common that a page needs CSS styling unique to it, and I hate litering a sites main stylesheet with customizations that only one particular page needs. We’ve talked about this before, and even created a custom method for doing so, as well as mentioned the art direction plugin, which makes this easily possible.

Add Private Content to Posts via Shortcode

Add Private Content to Posts via Shortcode

Recently, WP-Mix posted an incredibly useful technique that uses a shortcode to add private content to blog posts. This functionality makes it easy to manage leftover data, miscellaneous notes and other communication by keeping everything together with its corresponding post. Consolidating information like this helps to streamline flow and organization into the future.

Poll: HTML or XHTML for Markup?

Poll: HTML or XHTML for Markup?

Gonna do a new poll given the recent changes in the world of HTML/XHTML. As many of us probably realize, HTML5 is rapidly gaining popularity, but how many people are actually using it? And then if people are not choosing HTML5, then what are they using? When creating websites, designers have a variety of options for markup. Here is a partial list of the current options:

Custom Page Titles from Scratch

Custom Page Titles from Scratch

The titles of pages are controlled by the <title></title> tag in the <head></head> section of a website. They are important for all kinds of reasons. Telling the user where they are. The name of the page when bookmarked both locally and socially. They are important for SEO.

Next/Previous Post Navigation Outside of the WordPress Loop

Next/Previous Post Navigation Outside of the WordPress Loop

WordPress provides several navigational template tags to make it easy for visitors to surf your pages. There are basically two different types of template tags used for chronological post navigation:

Poll Results: How Do You Use the WordPress Media Library?

Poll Results: How Do You Use the WordPress Media Library?

Back in January, we asked How Do You Use the WordPress Media Library?. After more than 700 votes, the results are in:

What’s the best Caching Plugin?

Really nice article running down the major caching plugins, including some ones I have never heard of. I’m a fan of W3 Total Cache myself, having tried about four of them on various sites. I like the CDN integration, the fact that it doesn’t change your URLs, and that it combines file and database caching. Not to mention it is actively maintained.

Most interesting are the options that turn out to be worse that no caching at all. CSS-Tricks does nearly 2.5 million pageviews a month and can run OK without caching, it’s just much faster and surge-protected with it on.

eReaders and Digging Into WordPress

eReaders and Digging Into WordPress

When the iPad came out I was able to convince myself that it really is my responsibility as a publisher of a digital book that I should have this device for testing.

Call a Widget with a Shortcode

Call a Widget with a Shortcode

We covered how to run a shortcode in a widget. But what about inserting a widget with a shortcode? I recently had this situation come up.

I had a single page where I just wanted to be able to chuck in a widget without the whole rigmarole of creating a special widgetized area and probably a custom page template for that widgetized area and so forth and so on.

I wanted to just put [widget widget_name="my_widget"] in the pages content and have that widget pop in. Turns out it wasn’t as easy I wanted it to be, but it’s not that bad…

WordPress Custom functions.php Template, Part 2

WordPress Custom functions.php Template, Part 2

In a recent post, we show you how to clean up and enhance the functionality of WordPress with a custom functions.php template. In that post, we explain how using a custom functions.php template can speed up development while optimizing many key aspects of WordPress. In this post, we deliver another prime collection of 15 custom functions to enhance your WordPress site. These functions provide all sorts of useful functionality, including stuff like:

Mobile Version of DigWP.com

Just to let you know about the new mobile version of the site. This makes it much easier to visit on many mobile devices. Shouts to mobify.me for making it happen.

DigWP.com on the iPhone at al

wpSEO vs. All-In-One SEO Pack

wpSEO vs. All-In-One SEO Pack

The most popular SEO plugin for WordPress is certainly the All-In-One SEO Pack. It’s on just about every plugin roundup you’ll ever see. It’s free. It works well. But it’s not the only kid on the block. One of the guys from WP Engineer has a competing product: wpSEO. I’ve now used them both. I thought a head-to-head comparison would be useful for people to make their own decisions.

© 2009–2024 Digging Into WordPress Powered by WordPress Monzilla Media shapeSpace