New book on WordPress Theme Development: WordPress Themes In Depth
tweaks
Tag Archive

WordPress Core File Edits at Perishable Press

Update: After upgrading Perishable Press in 2007, many of the hacks listed on this page are no longer applicable. Please refer to our new WordPress Core Edits for current information. Otherwise, this article remains online for reference purposes only. The folks developing WordPress are continually rolling out “upgrades”. While it is generally a good idea to stay current, it can also be a bit of a pain if you have made any changes to the WordPress core files. Our recommendation? Keep a log such as this one that either includes all edits or links to posts describing them. That way, […] Read more »

Associate Extensionless Files with Notepad in WinXP

There are several files that appear not to have extensions in Windows XP. Perhaps the best known example is the HOSTS file. Files such as the HOSTS file that appear to be "extensionless" actually contain an invisible period "." — or dot — at the end the file name. It is this invisible dot that will enable us to select a specific program with which to open files with no extensions. As web developers, we are constantly checking and consulting server-generated error_log files. Like the HOSTS file, the error_log files appear to have no associated extension. In Windows XP, opening […] Read more »

Lightbox + FancyTooltips Bug Fix

For those of us enjoying the stylish functionality of Lightbox or any of its many incarnations, images "magically" overlay the window and unfold, revealing navigational buttons, image count, and of course the image titles. For those of us enjoying the stylish functionality of FancyTooltips (original link now 404 @ http://victr.lm85.com/projects/fancytooltips/) or any of its many incarnations, title and alt attributes manifest as stylish displays of CSS brilliance. However, for those of us employing both features, there is a potential JavaScript conflict. This conflict makes it impossible for Lightbox to display the contents of title attributes associated with images. Thus, if […] Read more »

Passing Quotation Marks via wp_link_pages

According to the WordPress Codex 1, it is possible to pass quotation marks via the parameters of the function, wp_link_pages(). This would enable users to assign a particular css class or id to the function output, thereby providing greater design and behavioral control over that particular object. But alas, as reported several times in the WordPress Codex 2, wp_link_pages() is unable to pass quotes without causing errors. To fix this, we open template-functions-post.php and find wp_link_pages(), which is located around line #121 (for WP 2.0.2). The fix is easy, simply edit the <p> in the following lines: $r[‘before’] = ‘<p>’ […] Read more »

Reversing WordPress Page Navigation Order

This article explains how to reverse the order of WordPress page navigation links. To reverse the default (backward) order of page navigation in WordPress, open the file template-functions-links.php (in WP 2.0) or link-template.php (in WP 2.1/2.2) and scroll down to the last function, posts_nav_link() 1. Next, find the last if statement and switch the order of the following two lines: previous_posts_link($prelabel); [ ignore this line ] next_posts_link($nxtlabel, $max_page); Next, within the first line of the same function (beginning with function posts_nav_link), switch the order of the variables $prelabel=’&laquo; Previous Page’ and $nxtlabel=’Next Page &raquo;’. Finally, within the loop, make sure […] Read more »

Gizoogle Gonna Break it Down

Gangsta lean. Gangsta tuff. Da Gizoogle Search Engine & Translator delivahz da roofless bidniss fo' da previous post. Update 2012 March 1: looks like the Gizoogle site is down. May come back, so I’ll leave the links.. and the translated post ;) Osseus Website Yo Multimedia artist extraordizzle Kenneth Paul Schrag — betta known as Osseus ta his fellow DLa posse — is currently in tha process of updat'n his personal design portfolio website (Flash required) aww nah. Ken's aww nah. work is diverse, wit online samples cover'n both graphic design n illustration. We finally met up wit Ken n […] Read more »

Title Attributes for WordPress Post Navigation

Improve accessibility by adding title attributes to your WordPress userspace. Note: This article applies specifically to WordPress 2.0.2, but may be generalized to any WP 2.0+ version. By default, WordPress navigation links omit the title attributes for both page and post views. Title attributes for links provide additional information that can improve the accessibility of your website. This is especially true when images or text symbols exclusively are used for navigation. To add title attributes to WordPress page-view links (e.g., links for index, archive, and category views), open the file wp-includes/template-functions-links.php and find the functions previous_posts_link (line #494) and next_posts_link […] Read more »

WordPress RDF Source Makeover

Beautiful Source-Code Output, Part 1: Whip your WordPress RDF Code into Submission Update: This article applies specifically to WordPress 2.0.2, but may be generalized to any WP 2.0+ version. I love looking at beautiful source-code output. However WordPress tends to spit code out in random chunks, often leaving spaces, line breaks, and tabs littered throughout the source output. This messes things up. Lists don’t look like lists and logically written code often appears scattered along the page carelessly. Often, this is the result of poorly written PHP, which can be manipulated to write beautifully aligned code that looks as good […] Read more »

Latest Tweets We said NO to SOPA in 2012 but they didn't get the message. Time to kill #ZombieSOPA once and for all: takeaction.withgoogle.com/tw-s…