Articles tagged as “WordPress

Here is a list of all articles tagged as “WordPress”. If you enjoy the high-quality content that I provide here at Perishable Press, you may want to subscribe to our main content feed to stay current.

Digging into WordPress Version 3.0
It’s here! Digging into WordPress Version 3.0 is packed with goodness, including a new chapter on WP3, updated core content, and a super-sleek new cover. DiW3 cover by Chris Coyier Updated Core Material Much has changed with WordPress since our previous book update (v2), so for version 3.0 we went through the book and updated/removed outdated core content. Everything is now hot-wired and fine-tuned to the latest version of WordPress, with new popouts and fresh links throughout the book. Here’s a shot from one of the updated core ...
htaccess Code for WordPress Multisite
For the upcoming Digging into WordPress update for WordPress 3.0, I have been working with WordPress’ multisite functionality. Prior to version 3.0, WordPress came in two flavors: “original” and “multisite” (MU). Most designers probably work with regular, one-blog installations of “regular” WordPress. The htaccess rules for all single-blog installations of WordPress haven’t changed. They are the same for WordPress 3.0 as they are for all previous versions. But now that multisite has merged with regular-flavored WordPress, we can stick with single-blog installs (which is how things are setup by default), or we can activate multisite functionality and create an unlimited network ...
Fixing WordPress Infinite Duplicate Content Issue
Jeff Morris recently demonstrated a potential issue with the way WordPress handles multipaged posts and comments. The issue involves WordPress’ inability to discern between multipaged posts and comments that actually exist and those that do not. By redirecting requests for nonexistent numbered pages to the original post, WordPress creates an infinite amount of duplicate content for your site. In this article, we explain the issue, discuss the implications, and provide an easy, working solution. Understanding the “infinite duplicate content” issue Using the tag, WordPress makes it easy to split your post content into multiple pages, and also makes it easy to paginate the display of your comment threads. For both paged posts ...
Digging into WordPress Version 2: New Chapters, Free Themes, and Site Redesign
The updated book is looking better than ever! A little over 3.5 months after Digging into WordPress v1, Chris and I have updated the book, the site, and everything else for DiW Version 2. Both PDF and printed-version of the book now include two new chapters and two free themes. We have a new “Bonus Tricks” chapter with some awesome theme techniques, and another chapter on “WordPress Updates” that explains how to use all the latest WordPress features. Along the way, we also discuss the two free themes that ...
Book Giveaway Winner!
Congrats to Oliver Edwards for winning the randomly selected book giveaway! Oliver Edwards will receive a complimentary printed edition of Digging into WordPress along with the digital PDF version. Thank you to random.org for the true random number generator. Thanks to everyone for entering, and for sharing some great reasons why WordPress is #1.
Book Giveaway: Print Version of Digging into WordPress
I have a free print version of Digging into WordPress to give away to one lucky winner. To qualify for the giveaway, simply leave a comment on this post stating your absolute favorite thing about WordPress. The winner will receive a free printed copy of DiW shipped to their door, plus a lifetime subscription to the PDF version of the book. I will announce the randomly chosen winner next week. – Good luck! :)
Print Version of Digging into WordPress is Here!
Nearly six weeks after releasing the electronic version of Digging into WordPress, Chris and I are proud to announce that the printed version is now available. Beautiful custom design with full-color printing on every page Beautiful custom design.. Make no mistake, this is a beautiful, custom-designed book that makes it fun and easy to soak in the wisdom and advance your WordPress skills. Every detail has been carefully crafted -- from the landscape page-orientation and color-coded chapters to the lay-flat spiral binding and large, easy-to-read text -- this book ...
Protect WordPress Against Malicious URL Requests
A few months ago, many WordPress sites were attacked with some extremely malicious code. While searching for a good solution, I discovered the following gem of a plugin in the pastebin repository: This script checks for excessively long request strings (i.e., greater than 255 characters), as well as the presence of either “eval(” or “base64” in the request URI. These sorts of nefarious requests were implicated in the September 2009 WordPress attacks. To protect your site using this lightweight script, save the code ...
Stupid WordPress Tricks
One of the most popular articles here at Perishable Press is my January 2005 post, Stupid htaccess Tricks. In that article, I bring together an extensive collection of awesome copy-&-paste HTAccess code snippets. Four years later, people continue to tell me how much they enjoy and use the content as a bookmarked reference for many of their HTAccess needs. The article was even published in a book on Joomla! Security. This is very inspiring to me, so I have decided to create a ...
Getting Serious with a New Design
New design in effect at Perishable Press. It’s sort of a hybrid between some of the things I like about the Quintessential theme and some of the best parts of the subsequent Requiem theme. So this new theme is named Serious because it represents a renewed commitment to design, blogging, and everything I love about working on the Web. While I have everything fresh in my mind, here are some of ...
It’s Here: Digging into WordPress!
After nearly a year of production, Chris Coyier and I are stoked to announce our new book: Digging into WordPress! It’s nine jam-packed chapters (400 pages!) stuffed with everything you need to take your WordPress skills to the next level and really get the most out of WordPress. We take you through everything -- from setting up for success and creating the perfect theme to optimizing performance and tightening security, Digging into WordPress delivers the goods. You’ll learn how to harness the full potential of WordPress ...
Dressing up for Halloween..
Happy Halloween! This year, I thought it would be fun to dress up my site with one of its very first themes. The Lithium theme remains one of my favorites, despite some of the scary code used in a few of the template files. Even so, despite its relative simplicty, this theme features some great little details, and even features some stylish quicktags in the comments area. Incidentally, the Perishable Press logo was designed specifically for the Lithium theme way back in 2006. So enjoy this blast from the past! Hopefully it doesn’t scare anyone too badly.. Note: Thanks to Chris Coyier for ...
Stupid Twitter Tricks
Might as well face it, Twitter is here to stay. Not that it’s all that bad, just used to be a lot more laid-back and enjoyable. These days it seems to have been taken over by the lowest common-denominator, mostly high-school twits or useless commercial propaganda. Even so, I still enjoy tweeting the occasional profound thought once in awhile, and even like to play around with various types of “advanced” Twitter functionality. You know, cool stuff like including “Tweet This!” links with short URLs, showing off my number of Twitter followers, ...
Display Random Posts from Specific Tags or Categories
When developing the colorful Quintessential Theme (opens in new tab), I initially planned on displaying five random posts from each of my most popular tags and categories in the super-slick sliding-panel sidebar. Because I am running an older version of WordPress, however, this task proved to be quite the educational experience. In newer versions (from 2.5 I think) of WordPress, the query_posts() function enables users to display posts in random order using the orderby=rand parameter. This would have made my life easy, as I could have included the following code for each of my random post lists:...
Digging Into WordPress
Our recent quest to find a publisher has finally paid off. After spending a few weeks checking out different publishers and myriad publishing options, Chris Coyier and I have decided to go the DIY-route and publish the book ourselves as a PDF. The book is titled “Digging into WordPress,” and is due out late Summer or early Fall of this year. It’s going to be packed full of juicy WordPress goodness and I hope that you check it out when it’s released. In the meantime, while we are busy working behind the scenes to make the book the best it can ...
Farewell to Alex King’s Popularity Contest Plugin
I finally broke down and uninstalled Alex King’s once-great “Popularity Contest” plugin for WordPress. The plugin had been installed here at Perishable Press for over two years, and had provided fairly consistent and apparently accurate statistics. Unfortunately, there were serious errors involved with the plugin way back during the WordPress-2.3 upgrade that were never addressed by the plugin author. There was an interim version of the plugin that had patched the error until an official update was released, but sadly and almost two years later this has not happened. ...
Secure Visitor Posting for WordPress
Normally, when visitors post a comment to your site, specific types of client data are associated with the request. Commonly, a client will provide a user agent, a referrer, and a host header. When any of these variables is absent, there is good reason to suspect foul play. For example, virtually all browsers provide some sort of user-agent name to identify themselves. Conversely, malicious scripts directly posting spam and other payloads to your site frequently operate without specifying a user agent. In the Ultimate User-Agent Blacklist, we account for the “no-user-agent” case ...
9 Ways to Set Dynamic Body IDs via PHP and WordPress
When designing sites, it is often useful to identify different pages by adding an ID attribute to the element. Commonly, the name of the page is used as the attribute value, for example: In this case, “about” would be the body ID for the “About” page, which would be named something like “about.php”. Likewise, other pages would have unique IDs as well, for example: ..again, with each ID associated with the name of the page. This identification strategy is useful for a variety of reasons, including the following: Page-specific control over CSS via descendant selectors Page-specific DOM manipulation via ...
Important Security Fix for WordPress
The other day, my server crashed and Perishable Press was unable to connect to the MySQL database. Normally, when WordPress encounters a database error, it delivers a specific error message similar to the following: Default database-error message This customizable database error message explains the situation to visitors and circumvents any malicious activity involving exposed scripts, PHP errors, and other issues related to unexpected database issues. That sounds nice, but there is a problem The problem that I painfully discovered when ...
Import and Display RSS Feeds in WordPress
Importing and displaying external RSS feeds on your site is a great way to share your online activity with your visitors. If you are active on Flickr, Delicious, Twitter, or Tumblr, your visitors will enjoy staying current with your updates. Many social media sites provide exclusive feeds for user-generated content that may be imported and displayed on virtually any web page. In this article, you will learn three ways to import and display feed content on your WordPress-powered website — without installing yet another plugin. On the menu for this tutorial: Importing and displaying feeds with WordPress & Magpie (simple method) Importing and displaying ...
Looking for a Publisher
After several months of working diligently behind the scenes, I am officially announcing my latest project: a new book on WordPress. Without giving away too much at this time, here are some facts about it: It’s focused on WordPress It’s co-authored between Chris Coyier and myself It’s going to be awesome Chris and I have been working on the book for several months now and are very pleased with the results. Both of us have some -- albeit limited -- knowledge of the publishing world. Truth be told, we don’t have a publisher yet and aren’t quite sure about how to go about finding one. Does anyone ...
WordPress Tip: Valid, SEO-Friendly Email Permalink Buttons
In addition to your choice collection of “Share This” links, you may also want to provide visitors with a link that enables them to quickly and easily send the URL permalink of any post to their friends via email. This is a great way to increase your readership and further your influence. Just copy & paste the following code into the desired location in your page template:...
Book Review: WordPress for Business Bloggers
WordPress for Business Bloggers by Packt Publishing was a pleasure to read because it approaches many of the important aspects of WordPress from a slightly different perspective: that of the “business blogger”. The book is aimed at the aspiring business blogger who wants to use WordPress to run a successful business blog. The book claims to skip the basics and jump right into the meat of transforming WordPress into a lean, mean business blogging machine. While this may be true for the book’s target audience, the technical aspects of WordPress covered in the book are familiar ground to the seasoned WordPress user. Digging into ...
Better WordPress Archives via Dynamic Triple Column Layout
Here at Perishable Press, the number of posts listed in my archives is rapidly approaching the 700 mark. While this is good news in general, displaying such a large number of posts in an effective, user-friendly fashion continues to prove challenging. Unfortunately, my current strategy of simply dumping all posts into an unordered list just isn’t working. I think it’s fair to say that archive lists containing more than like 50 or 100 post titles are effectively useless and nothing more than a usability nightmare. With growing numbers of blogs building ...
Remove the WWW Prefix for all URLs via PHP
Canonical URLs are important for maintaining consistent linkage, reducing duplicate content issues, and increasing the overall integrity of your site. In addition to cleaning up trailing slashes and removing extraneous index.php and index.html strings, removing the www subdirectory prefix is an excellent way to shorten links and deliver consistent, canonical URLs. Of course, an optimal way of removing (or adding) the www prefix is accomplished via HTAccess canonicalization: # universal www canonicalization via htaccess # remove www prefix for all urls - replace all domain and tld with yours # http://perishablepress.com/press/2008/04/30/universal-www-canonicalization-via-htaccess/ RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^domain\.tld$ ...

Attention: Do NOT follow this link!