Tag: WordPress

Choosing the Best Title Separators

Posted on July 30, 2008 in Presentation, Structure by Jeff Starr

[ ~{*}~ ] While writing my previous article on creating the perfect WordPress title tags, I deliberately avoided discussing the use of separators in titles. I feel that the topic is worthy of its own article, enabling a more thorough exploration of the details. Title separators are the symbols, punctuation, and other characters used to distinguish between various parts of the page title. For example, a title may include the blog name, post title and blog description, with each element separated by a hyphen. Any Google search will reveal that some of the most commonly used title separators include the hyphen, the dash, and angled quotes. Many others are used as well, and we will explore some of them in this article.

Continue Reading

WordPress Error Fix: Unable to Parse URL

Posted on July 29, 2008 in WordPress by Jeff Starr

Note: This information is intended primarily for WordPress versions previous to 2.3, but may be applicable in other versions as well.

For those of you running an older version of WordPress that is generating errors such as:

Warning: parse_url(http://) [function.parse-url]: Unable to parse url in /home/path/to/public_html/wordpress/wp-includes/functions.php on line 1067
Warning: parse_url(http://) [function.parse-url]: Unable to parse url in /home/path/to/public_html/wordpress/wp-includes/functions.php on line 1067
Warning: parse_url(http://) [function.parse-url]: Unable to parse url in /home/path/to/public_html/wordpress/wp-includes/functions.php on line 1067 
Warning: parse_url(http://) [function.parse-url]: Unable to parse url in /home/path/to/public_html/wordpress/wp-includes/functions.php on line 1067 
Warning: parse_url(http://) [function.parse-url]: Unable to parse url in /home/path/to/public_html/wordpress/wp-includes/functions.php on line 1067 
Warning: parse_url(http://) [function.parse-url]: Unable to parse url in /home/path/to/public_html/wordpress/wp-includes/functions.php on line 1067 
Warning: parse_url(http://) [function.parse-url]: Unable to parse url in /home/path/to/public_html/wordpress/wp-includes/functions.php on line 1067 
Warning: parse_url(http://) [function.parse-url]: Unable to parse url in /home/path/to/public_html/wordpress/wp-includes/functions.php on line 1067

You can easily resolve the issue by suppressing these errors, which are automatically generated whenever the parse_url() function tries to parse an empty value for the URL. To silence the errors, open the file wp-includes/functions.php and locate the following code (around line #1067):

Continue Reading

How to Generate Perfect WordPress Title Tags without a Plugin

Posted on July 21, 2008 in WordPress by Jeff Starr

[ ~{*}~ ] Keeping an eye on all things WordPress, I have noticed an ongoing fascination with configuring the ultimate WordPress <title> tags. Many bloggers use various plugins to generate differently configured <title> tags depending on particular page views. A good example of this is seen in the All in One SEO Pack, which, among many other things, enables users to specify custom titles for several different types of pages. While there is nothing wrong with this approach, some of us prefer to run WordPress with as few plugins as possible. If you want to create perfect WordPress title tags without a plugin, this post will certainly help you do it. First we’ll explore some of the basics, continue with some common examples, and then conclude with a comprehensive, highly flexible script for generating distinct page titles. All of the techniques presented in this article should work well with virtually all versions of WordPress.

The Basics

The <title> tag is used within the <head> section of (X)HTML pages to communicate the title of the document to both humans (your visitors) and machines (search engines). For dynamically generated sites, such as those powered by WordPress, many different types of pages exist, including:

Continue Reading

WordPress Tip: Link Author Comments to the Home Page

Posted on July 14, 2008 in WordPress by Jeff Starr

[ ~{*}~ ] After almost three years of blogging here at Perishable Press, I had an epiphany about my author comment links. Way back when, after installing WordPress in a subdirectory called “/press/”, I decided to set the URL for my Administrative User Profile’s website as “http://perishablepress.com/press/”. After all, it seemed to make sense at the time, plus it really didn’t seem to matter; nobody was going to see my personal profile information anyway, right?

Wrong.

Three years later, I finally realize that it does matter. The URL that you enter as your profile’s website address is the URL that will be used for every author commentator link on your site. Yes, I know what you’re probably thinking, “what an idiot! I thought everybody knew that!” Well, no, obviously not everybody. It may have occurred to me momentarily or subconsciously at some point along the way, but it wasn’t until just a few days ago that the light bulb finally flashed.

So what’s the big deal? First and foremost, one of the most highly visible and prevalent links to your site comes from your own author commentator links. These links are used to represent your site for every one of your own comments. Other commentators and visitors recognize the link, note the location, and possibly use it when linking back to your site. Thus, it is important to represent your site by linking to the optimal URL in your author commentator links.

Continue Reading

WordPress Tip: Disable Comments in Old Posts via PHP

Posted on July 8, 2008 in WordPress by Jeff Starr

Just a quick WordPress snippet for future reference. I recently explained how to disable comments, pingbacks, and trackbacks via SQL. Here’s a good way to do it via PHP:

<?php 
function close_comments( $posts ) {
	if ( !is_single() ) { return $posts; }
	if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( 30 * 24 * 60 * 60 ) ) {
		$posts[0]->comment_status = 'closed';
		$posts[0]->ping_status    = 'closed';
	}
	return $posts;
}
add_filter( 'the_posts', 'close_comments' ); 
?>

You can run this script as a plugin, through your theme’s functions.php, or through a custom user-functions.php file. Simply set the desired number of days by changing the number “30” to whatever you would like. As is, this script will close comments, pingbacks and trackbacks on all articles posted more than 30 days ago.

Working with Multiple Themes Outside of the WordPress Installation Directory

Posted on July 7, 2008 in WordPress by Jeff Starr

[ ~{*}~ ] As you may observe, the WordPress installation that powers Perishable Press is located in a subdirectory named press. This configuration was intentional, as I wanted to have the option to easily install and maintain multiple versions of WordPress in variously named subdirectories. As much as I enjoy this flexibility, many would argue the SEO-related benefits of installing WordPress in your site’s root directory, or at least making it appear that way by using WordPress’ easily customizable “Blog Address” options setting.

For example, say you have WordPress installed in a subdirectory called “gibbonz”, but you want your blog’s home page to exist at http://your-domain.tld/ and not http://your-domain.tld/gibbonz, as would be the case by default. To make this happen, you have several choices, including this method, which I summarize here, assuming the “gibbonz” scenario outlined in the preceding discussion:

Continue Reading

WordPress Plugin: Authenticate

Posted on June 29, 2008 in WordPress by Jeff Starr

[ Icon for Authenticate ] Authenticate is a free WordPress plugin that enables universal and/or targeted inclusion of custom content for both feeds and posts. Ideal for adding copyright information, distribution policy, thank-you messages, custom links, special offers, and much more. Custom content may be added to any location within posts or feeds — before, after, or even within post content. This highly flexible content-addition plugin works great on all 2+ versions of WordPress (i.e., 2.0, 2.1, 2.2, 2.3, 2.5+).

Continue Reading

Spanish Version of Contact Coldform Released

Posted on June 22, 2008 in WordPress by Jeff Starr

Great news! Contact Coldform is now available in Spanish (Spain). Special thanks to Fernando Tellado of Ayuda Wordpress for his superb Spanish translation of the Coldform. Fernando has articulately translated both the administration panel and all of the (X)HTML/text output as well. Contact Coldform is now the perfect solution for Spanish users of WordPress who desire a super-clean, standards-based contact form. Thanks Fernando! :)

For more information, check out Fernando’s post, Plugin Contact Coldform en Español. There you may obtain more information and also download the Spanish (Spain) version of Contact Coldform. You may also download the Spanish version via the Coldform home page. Also, check out Ayuda Wordpress’ post comparing Contact Coldform to Cforms II.

Preventing the Unpredictable White Screen of Death for WordPress Sites with Multiple Themes

Posted on June 16, 2008 in WordPress by Jeff Starr

For the past several months and up until just recently, Perishable Press had been suffering from unpredictable episodes of the dreaded white screen of death. Although blank white screens happen to virtually all WordPress users now and then, certain configurations seem to trigger crashes more frequently than others. Here, I am referring to WordPress version 2.3.

In this case, the unpredictable crashes, inconsistent errors, and general instability began several months ago after I had completed my WordPress theme restoration project. Prior to that, I had removed all of my alternate themes and placed them on a subdomain. Meanwhile, after the themes had been removed, I decided to enable the default WordPress cache (don’t ask why). For the next month or so, before restoring my themes, my site performed exquisitely: uptime at 99% (on a shared server, no less), virtually no errors, and so on. Then, after restoring alternate theme functionality, the site began locking up and crashing multiple times each day. Here is a summary of the sequence of events (estimated time frames):

Continue Reading

3 Ways to Exclude Content from WordPress Feeds

Posted on June 11, 2008 in WordPress by Jeff Starr

~{*}~ This may surprise you, but I post quite a bit of content that never appears in the site’s main feed. It is my impression that a vast majority of subscribers are interested in web/graphic-design and development-related topics, and are really much less interested (if at all) in the miscellaneous odds and ends that wind up in the ever-expanding Perishable Press database.

In the past, the process of excluding content from the main feed typically involved changing the post-date to something at least a year or so in the past. The thinking was that I could always return to these posts at some point in the future and put them back into sequential order. Although effective, this process quickly became far too tedious and time-consuming to prove practical. Keeping my eyes open for possible solutions, I have accumulated several excellent techniques for excluding content from WordPress feeds.

Continue Reading

WordPress Hack: Multiple Email Recipients for Contact Coldform

Posted on June 9, 2008 in WordPress by Jeff Starr

In the current version of my custom contact-form WordPress plugin, Contact Coldform, there is no built-in method of sending emails to multiple addresses. The thought of adding such functionality had not occurred to me until recently, when a Coldform user asked about enabling it. After a bit of investigation, it turns out that integrating multiple-recipient functionality into Contact Coldform is as easy as it is practical. I will definitely be adding this feature to the next release of the Coldform, however, here is the modification procedure for those who just can’t wait.

Continue Reading

WordPress Tip: Quick Hack to Block Spam for the Wordspew Shoutbox Chat Plugin

Posted on June 2, 2008 in WordPress by Jeff Starr

Recently, I reactivated an older version (1.16) of Jalenack’s Wordspew Shoutbox plugin for the Dead Letter Art chat forum. The DLa collective (of which I am a member) has been working on a new issue of their ‘zine and needed an easy online chat location for impromptu business dealz (ideas, planning, etc.). Almost immediately after reactivating the Shoutbox plugin, the chat forum was flooded with an endless wave of spam. The rate and volume of spam was so high as to render the forum utterly useless. — Ugh.

Continue Reading

Consolidate and Localize Your WordPress Feeds

Posted on May 26, 2008 in WordPress by Jeff Starr

[ ~{*}~ ] Recently, I found occasion to consolidate and localize my WordPress feeds. A couple of years ago, shortly after I first began using Feedburner to deliver and monitor my site’s feeds, I began listing my Feedburner-assigned feed URL in addition to my localized WordPress feed URL. As time went on, inconsistent feed linkage here at Perishable Press had greatly convoluted the feed-subscription process. Confounding factors include:

Continue Reading

WordPress Tip: Update Email Address in the WordPress Database

Posted on May 18, 2008 in WordPress by Jeff Starr

[ ~{*}~ ] Several months ago, I changed my email address to stop spam. Since then, I have been updating every instance of my old address that I can find. In WordPress, I edited all of my theme files and updated my profile information in the “Users” admin area. Several days later while digging through the comments table in the WordPress database, I realized that the user-profile update is only pro-actively effective. There were still hundreds of instances of my old email address associated with comment-author information in the comments table. No big whoop for some, but the devastating inconsistency of it all would have kept me from a good night’s sleep (or maybe that was the caffeine..).

Continue Reading

Three Unsolved WordPress Mysteries

Posted on April 8, 2008 in WordPress by Jeff Starr

After several years of using WordPress, I have at least three unanswered questions:

  • What’s up with the WordPress PHP Memory Error?
  • Why do certain phrases trigger “Forbidden” errors when saving or publishing posts?
  • What happened to the Plugin Pages in the WordPress Codex?

Let’s have a look at each one of these baffling mysteries..

Continue Reading

Perishable Press Theme Renovations Complete

Posted on April 6, 2008 in Perishable by Jeff Starr

Finally, after many grueling weeks of relentless determination and tedious repetition, I am pleased to announce the return of the entire collection of Perishable Press themes. Enabling users to change the appearance and functionality of the site, the fifteen unique themes were dismantled several months ago for the ongoing Perishable Press site renovation. Since then, links referring to the removed themes had been redirected to a temporary “Labs” subdomain (labs.perishablepress.com), which featured various installations of WordPress populated with “lorem ipsum” filler text. Although this was suitable as a temporary fix for those interested in exploring the different themes, full theme renovation and restoration remained an ongoing task that finally (finally!) reached its conclusion late last week.

Each and every theme has been painstakingly evaluated, optimized, improved, and tested. During the process, many structural, organizational, and presentational improvements were made. Each theme now operates independently, requiring no files (images, scripts, etc.) beyond those contained within the theme directory itself. Further, each theme has been integrated into a sitewide error-logging process whereby all errors (PHP, 404, htaccess, etc.) are logged in a centralized location and appended with plenty of theme-specific information. Thus, if someone begins to experience issues with one of these newly restored themes, I will be the first to know. This is important as people begin to use the themes under different circumstances (operating systems, user agents, extensions, etc.). I tested as much as possible to ensure universal functionality, but must admit a significant reliance and dependence on Web Standards throughout the restoration process. Thus, if something breaks on Internet Explorer, I won’t be surprised ;) So, without further ado, here is a summary of each newly renovated theme — feel free to check ‘em out!

Continue Reading

Redirect WordPress Feeds to Feedburner via htaccess (Redux)

Posted on March 25, 2008 in Function, WordPress by Jeff Starr

[ ~:{*}:~ ] In a previous article, I explain how to redirect your WordPress feeds to Feedburner. Redirecting your WordPress feeds to Feedburner enables you to take advantage of their many freely provided, highly useful tracking and statistical services. Although there are a few important things to consider before optimizing your feeds and switching to Feedburner, many WordPress users redirect their blog’s two main feeds — “main content” and “all comments” — using either a plugin or directly via htaccess. Here is the htaccess code as previously provided here at Perishable Press:

Continue Reading

How to Display Your Twitter Posts on Your WordPress Blog

Posted on March 22, 2008 in Blogging, WordPress by Jeff Starr

Alright, time for another “How’d-you-do-that-thing-on-your-site?” post. This question comes from the one and only Mr. Graham of ImJustCreative.com. In a recent email, Graham literally begged me to share my “secret recipe” for displaying my latest Twitter Tweets (wow, did I actually just say that?) right here on Perishable Press:

…Would be really really decent of you if you could let me know how to do it? Pretty please? How do you call the last twitter feed, what commands do you need etc?

In case you have no idea what we’re talking about here, scroll down to the bottom of any page on the site (using the current theme) and observe the savviness and sophistication of my latest Twitter post, updated automagically every fifteen minutes. Or, for those of you too lazy to “go there,” here is a screenshot demonstrating the perpetual Twitter display:

Continue Reading

WordPress Tip: Careful with that Autosave, Eugene

Posted on March 17, 2008 in WordPress by Jeff Starr

After upgrading WordPress from version 2.0.5 to 2.3.3, I did some experimenting with the “post autosave” feature. The autosave feature uses some crafty ajax to automagically save your post every 2 minutes (120 seconds by default). Below the post-editing field, you will notice a line of text that displays the time of the most recent autosave, similar to the following:

[ Screenshot: WordPress Autosave Message (Saved at 2:34:02.) ]

Surely, this relatively new feature provides an added layer of protection against lost work, but all is not perfect (yet) in the world of automatically saved content.

Several months ago, I lost several hours of work because the autosave feature completely failed to work, despite the periodically reassuring “Saved at..” message. After working for several hours with a false sense of security, WordPress choked and my post had vanished. In shock, I scoured the database for any trace of my recent efforts, but to no avail. The entire post had disappeared into the void. Utterly devastated and disillusioned, I decided to investigate the so-called “autosave” feature, learn what had happened, and take steps to avoid such travesty in the future. Here is a summary of my investigation..

Continue Reading

WordPress Tip: Remove Spam from the Comment Subscription Manager

Posted on March 10, 2008 in WordPress by Jeff Starr

[ Image: Jonny Quest (Inverted) ] After investigating some unusual 404 errors the other day, I found myself digging through the WordPress Admin trying to locate the “Subscribe to Comments” options panel. As it turns out, administrative options for the Subscribe to Comments plugin are split into two different areas. First, the S2C plugin provides configuration options under “Options > Subscribe to Comments”, which enables users to tweak everything from subscription messages to custom CSS styles. New to me was the other half of the S2C administration area: the Subscription Manager! Carefully hidden under “Manage > Subscriptions”, the Subscription Manager provides several useful ways to filter your email subscribers:

Continue Reading

What is My WordPress Feed URL?

Posted on March 9, 2008 in WordPress by Jeff Starr

[ ~{*}~ ] For future reference, this article covers each of the many ways to access your WordPress-generated feeds. Several different URL formats are available for the various types of WordPress feeds — posts, comments, and categories — for both permalink and default URL structures. For each example, replace “http://domain.tld/” with the URL of your blog. Note: even though your blog’s main feed is accessible through many different URLs, there are clear benefits to using a single, consistent feed URL throughout your site.

Continue Reading

Perishable News: Site Upgrades, Upcoming Interview, and PageRank Update

Posted on March 3, 2008 in Perishable by Jeff Starr

[ Photo: Perishable ] Ever since writing that last review article, I have been feeling the need to cut loose, relax, and blog about something a little more “down-to-earth,” like recent things that have been happening around here. If you are new to Perishable Press, rest assured that I try to keep these “site/personal news” update posts down to a minimum. Whenever possible, I save up a bunch of interesting off-topic things that I want to talk about, and then cram them all together into a multipurpose article like this one. I have found that consolidating and summarizing multiple news items into one post helps keep noise to a minimum while providing a more complete “snapshot” of current events. That said, let’s see what’s been happening ‘round here lately..

Toggle High Contrast Style

Due to popular demand, I have implemented an alternate “high-contrast” CSS stylesheet for the current theme. If you find the content difficult to read due to the low-contrast, “grey-text-on-black-background,” click on the small sun icon located in the lower-right corner of the browser window to brighten things up a bit. Conversely, to restore the original (dark) appearance, click on the moon icon in the same location. This “toggle-contrast” functionality has been around for awhile, but I have not found the opportunity to mention it until now.

Continue Reading

Arabic Version of Contact Coldform Released

Posted on March 3, 2008 in WordPress by Jeff Starr

Announcing an improved, Arabic version of my latest WordPress plugin, Contact Coldform. The new version features complete UTF-8 compatibility and has been completely translated to the Arabic language. Here is a detailed breakdown of changes made for the Arabic version:

  • Completely translated to Arabic
  • Encoded in UTF-8 without BOM
  • Emails now sent in HTML format
  • Added line breaks in HTML format
  • Right-to-left text presentation
  • Customized layout for Arabic
  • Full UTF-8 support

Of course, none of this would have been possible without the generous help of:

For more information, check out the original thread at ar-wp.com. There you may obtain more information and also download the Arabic version of Contact Coldform. You may also download the Arabic version via the Coldform home page.

WordPress Discussion Management: Enable or Disable Comments and Pingbacks via SQL

Posted on February 20, 2008 in WordPress by Jeff Starr

[ ~{*}~ ] Continuing my quest to stop comment spam without using plugins, I have decided to disable comments on “old” posts. In my experience, over 90% of comment, trackback and pingback spam occurs on posts that have been online for over a month or so, just long enough to be indexed by the search engines and picked up by spammers. Especially for older posts that have managed to acquire a little page rank, the frequency of spam attempts is far greater than it is for fresher content. Throw dofollow comment status into the mix, and say “hello” to a hellish number of spam attempts on established pages. Thus, my evolving anti-spam strategy now includes discussion management, which involves periodic closing of feedback on older posts. In this article, we will examine currently available methods of managing comments, and then proceed with a versatile toolbox of SQL queries for complete discussion management.

Continue Reading