New version of Digging into WordPress now available! The DiW v3.3 update covers WordPress 3.3 & 3.2, with fresh new sections and updated content throughout the book. Similar to the latest versions of WordPress, DiW 3.3 refreshes the look and feel of the book, with updated graphics and screenshots, streamlined content, and new bonus versions [...]
Notification List for v3.3 Printed Books
Digging into WordPress v3.3 is now available, and more printed books are on the way. It can take some time for the books to be printed and delivered, so we’re setting up a notification list for people who want to know when the new books are back in stock. To get on the list, just [...]
WordPress CMS Plugins
To make room for new content for the DiW 3.3 update, we’re “excerpting” this section into its own blog post. Here you’ll find an extensive round-up of CMS plugins for WordPress. Includes CMS plugins for better admin functionality, user-role management, custom content display, e-commerce & shopping carts, forums, newsletters, and more. Administration Tools These plugins [...]
Smarter Slugs ~!@$%^&*()={}<>[]?
See those crazy characters in the title of this post? Now see how they don’t appear in the post’s URL? That’s one of the finer details of the WordPress 3.3 update: smarter permalink slugs. So when you type something like you see in the title of this post, with all the funky characters, or even [...]
Plugins for SOPA/PIPA Blackout
Get involved! Here is a list of stop-SOPA/PIPA plugins to help blackout your WordPress-powered site: SOPA Blackout Plugin “This plugin allows you to set SOPA blackout dates for your WordPress website, as well as a variety of options on who the anti-SOPA is shown too. You can have it shown instead of your site for [...]
Goodbye Admin Bar, Hello Toolbar
When the Admin Bar hit the streets in WordPress 3.1, people seemed to either love it or hate it. And rightly so, it was a significant change in the appearance of the WP Admin area, and if not disabled in your User Profile, the front-end of your site as well. Many tips, tricks and plugins [...]
Poll Results, Book News, and More!
We’ve had several polls going in the DigWP.com sidebar for quite some time now, and it’s been interesting watching the trends change over time. The first and longest ongoing poll is HTML or XHTML for Markup?, which now has over 7,000 votes. HTML or XHTML for Markup? When the poll started in April 2010, the [...]
Displaying Theme Data with WordPress
A cool trick you can do with WordPress is display information directly from your theme’s style.css stylesheet. I recently used this on a site where the theme’s version number is used throughout the template to keep things current and consistent. get_theme_data() The function that makes it possible is called get_theme_data(), and it simply returns an [...]
HTML Formatting for Custom Menus
For some projects, it’s nice to output clean, well-formatted markup. Using theme template files enables great control over most of your (X)HTML formatting, but not so much for automated functionality involving stuff like widgets and custom menus. One of my current projects requires clean, semantic HTML markup for all web pages, but also takes advantage [...]
Clean Up “Cannot redeclare” Hack
One of my clients was hacked with the so-called “Cannot redeclare” hack. It seems closely related to the nefarious TimThumb hack, so if you’ve been hit by either of these hacks, you should check for the other. Apparently these hacks affect shared servers, so if you host multiple WordPress sites, chances are high that they’re [...]
That’s Not Spam: False Positives and Ham
Everyone loves a good comment. Readers benefit from the shared information and authors appreciate the conversation and feedback. But you gotta keep the spam out. Akismet and other anti-spam plugins do an excellent job of automating the process, but it’s a good idea to watch out for false positives: legitimate comments marked as spam. Rescuing [...]
Import Feed, Display in Multiple Columns
Recently I worked on a project where a single RSS feed was imported and displayed in multiple columns on the web page. Certain pages display feed items in two columns, others in groups of three or more. This technique uses WordPress’ built-in fetch_feed functionality to parse external feeds, and a slice of PHP magic to [...]
Where to Get Help with WordPress
We get quite a few requests for 1-to-1 WordPress support, but unfortunately don’t have the resources to help everyone directly. We frequently see emails like this: I understand that you are not able to give 1:1 support, so I would like to ask: where (web, forum, IRC) do I get answers about this? So people [...]
3 Ways to Reset the WordPress Loop
WordPress does an excellent job of keeping track of what’s happening with the loop, but once you start customizing parameters and setting up multiple loops, it’s a good idea to explicitly reset them using one of three WordPress template tags. In this DiW post, we’ll explore these techniques to get a better understanding of when [...]
Using ‘$’ instead of ‘jQuery’ in WordPress
Writing out ‘jQuery’ a billion times in a script makes it harder to read and bloats its size. Let’s stop doing that and start writing ‘$’ like you see in the vast majority of jQuery code in the world.
Create an Articles-Only Feed
WordPress makes it easy to publish content in any number of categories, with any number of tags, and with any type of custom post format. So for example, in addition to full articles, you could also offer screencasts, links, side posts, tweets, and all sorts of other peripheral content. Complementary material may work great for [...]
How to Redirect Logged-In Users
WordPress provides a variety of ways to redirect logged-in users. In this DiW post, we explain each of these methods along with some useful tips and tricks along the way. These techniques enable you to redirect logged-in users to internal pages, external pages, and even return them to the current page. wp_redirect The wp_redirect function [...]
New DiW Affiliate Program
Earlier this year, we had to close down our original affiliate program due to fraud and abuse. We hated to do it, and have been trying since that time to find a more secure way to make it happen. Thanks to all of the great tips, ideas, and feedback we received from our original affiliates, [...]
Clean Up Weird Characters in Database
It’s been a crazy month, with lots of drama all over the place. Here at DigWP.com, we had an episode where the site was all screwed up and not loading or only partially loading, blank white pages, and the whole bit. During the process of keeping it together and trying to restore full functionality, numerous [...]
Super Summer Sale!
The summer months are upon us, and to celebrate we’re having a Super Summer Sale for huge savings on both the PDF version and Print Editions of Digging into WordPress. For the next 7 days, you can save $15 on the Printed books and $7 on the PDF/eBook. Just apply the following codes during checkout [...]
So really, don’t use just /%postname%/ as your permalink structure.Update: This issue is FIXED in WordPress 3.3. Here’s the really short version: I used /%postname%/ as my permalink structure on CSS-Tricks for a long time. I have lots of Pages. My site went down. I changed my permalink structure to begin with a number. Now it’s fine. And the long version: All the sudden [...]
Fun Edit Posts Link (✍)Tiny little fun idea by Dave Rupert. Put this: <?php edit_post_link(‘✍’,”,’ ‘); ?> before all your: <?php the_title() ?> So like: <h1><?php edit_post_link(‘✍’,”,’ ‘); ?> <?php the_title() ?></h1> And when logged in, if you have edit privileges for that post/page/whatever, you’ll see the titles like: ✍ How To Be Awesome Where the little icon is [...]
Secure uploads, upgrade and other directories with .htaccess
It sucks, but a lot of plugins require certain directories to be set at CHMOD 777 for its file permissions. Of course, you should not use any plugin that requires 777 directories, but if you absolutely must, you can help protect the folder by adding a thin slice of htaccess. This works great for any [...]
Leave the Visual Editor ON
Just a quick reminder to anyone out there that may not know.. Enabling the Visual Editor in your User Profile settings gets you access to both Visual and HTML editors in the Write/Edit Post screen. Just click on either tab above the toolbar to toggle between modes. So you can write your posts in HTML [...]
Poll: Best Caching Plugin for WordPress?
New Poll! We’ve got several polls running in the sidebar at DigWP.com, and the latest asks which caching plugin is best. Sure it’s all anecdotal and subjective, but user feedback is a fun way to see trends and get an idea of the top plugins. Amazingly enough, there currently are over 1,000 plugins tagged as [...]