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

XHTML Document Header Resource

This XHTML header tags resource is a work in progress, perpetually expanding and evolving as new information is obtained, explored, and integrated. Hopefully, you will find it useful in some way. Even better, perhaps you will share any complimentary or critical information concerning the contents of this article. Table of Contents Important Information XML Declaration The !DOCTYPE The html tag The head tag The title tag base & item http-equiv link tags meta tags Geo meta tags Dublin Core tags References Read more »

HTML Frames Notes Plus

If you think that nobody uses frames anymore, think again. I personally know of one person who threw down some tuf HTML frame action for a personal site. So, in the interest of prosperity, we are hereby establishing this post as our official dumping ground for all HTML frame-related garbage. Break your pages out of someone else’s frames We begin our journey with a totally sick JavaScript method for breaking pages out of the illegitimate frames of some ineffectually pathetic bastard: <script type=”text/javascript”> <!–//–><![CDATA[//><!-- if (window.self ! = window.top) window.top.location = window.self.location; //--><!]]> </script> Likewise, here is an equally effective […] Read more »

Accessibility Notes Plus

Just a few useful accessibility notes.. Add accesskey attributes to important list items, content areas, and any other key areas of the document. Use alphanumeric characters as accesskey values, as in this example: <ul> <li><a id=”home” accesskey=”h” href=”http://domain.com/home.html”><span class=”accesskey”>h</span>home</a></li> <li><a id=”menu” accesskey=”m” href=”http://domain.com/menu.html”><span class=”accesskey”>m</span>menu</a></li> <li><a id=”search” accesskey=”s” href=”http://domain.com/search.html”><span class=”accesskey”>s</span>search</a></li> </ul> When an accesskey attribute is present within a link tag, pressing alt+letter on the keyboard is equivalent to double-clicking that link. Generally speaking, the presence of an accesskey attribute within an element brings focus to that element. Thus, radio and check boxes are toggled, links are clicked, and form elements […] Read more »

Spamless Email Address via JavaScript

Let’s face it, spam sucks. Give spammers the figurative finger by using this nifty bit of JavaScript to hide your email address from the harvesters. Here is an easy “copy-&-paste” snippet for including a spam-proof email address in your web pages. Although there are a million ways of doing this, I am posting this for the record (and because I just can’t stand deleting usable code). This technique uses JavaScript, and therefore is not 100% ideal for all users. My advice would be to include a <noscript> element that contains an image of your email address. That way, users without […] Read more »

Crazy CSS Underline Effects

Check out these crazy CSS underline effects: u.double { /* — double underline — */ border-bottom: 1px solid; } .altdouble { /* alternate double */ border-bottom: 3px double; line-height: 1.7em; } u.triple { /* — triple threat — */ border-bottom: 3px double; line-height: 1.9em; } Double Underline Effects! (via u.double class) Alternate Double Underline! (via .altdouble class) Triple Underline Effects! (via u.triple class) Note: if these examples do not display correctly with the current theme, click here to see them in action! Read more »

CSS Hack Dumpster

Consider this page a virtual dumpster of wonderful CSS hacks.. Commented Backslash Hack V2 This hack effectively hides anything after the “\*/” from MacIE5: /* commented backslash hack v2 \*/ div#something { boder: thin solid red; } /* end hack */ May also be used for CSS import directives: <style type=”text/css”> /* commented backslash hack v2 \*/ @import url(http://www.site.com/stylesheet.css); /* end hack */ </style> Fix Division Widths in IE Fix IE’s crazy box rendering. The first line limits to only IE. The second line * html div#somediv { /* limits to all IE */ width: 300px; /* width for WinIE5.x […] Read more »

sIFR Notes Plus

Here are a few sIFR Notes for Perishable Press. Just what are we looking at here? Well, first it is important to understand the sIFR variables and the order in which they should appear: (sSelector, sFlashSrc, sColor, sLinkColor, sHoverColor, sBgColor, nPaddingTop, nPaddingRight, nPaddingBottom, nPaddingLeft, sFlashVars, sCase, sWmode) The variable, sFlashVars consists of the following sub-variables (these should be seperated with an & sign: # Align Flash text block textalign=center # Moves text any number of pixels to the right offsetLeft=3 # Moves text any number of pixels down offsetTop=3 # Adds underline links when hovered underline=true Then, inducing from the […] Read more »

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 »

Category LiveBookmarks Plus

Update (2012/11/08): Category LiveBookmarks is discontinued as WordPress has integrated all of the same functionality. So no more need for this plugin!</update> New version of Category LiveBookmarks Plus now available! CLB+ 2.3.0b enables WordPress 2.3+ users to configure and customize the ultimate set of autodetection feeds, category feeds, category links, and feed links. Features include completely rewritten, optimized code, optional category post counts, and custom RSS-icon links for all category and/or feed links. Overall, the new version is faster and more flexible than ever! Category LiveBookmarks Plus is the easy way to provide complete “Live Bookmark” functionality and "Post Smart" […] Read more »

WordPress Search Function Notes

Code to call an external WordPress search form: <?php include (TEMPLATEPATH . “/searchform.php”); ?> Code for a standard, inline WordPress search form: <form id=”searchform” method=”get” action=”<?php echo $_SERVER['PHP_SELF']; ?>”> <p><input name=”s” type=”text” id=”s” size=”33″ maxlength=”99″ /> <input type=”submit” class=”submit” value=”Search &raquo;” /></p> </form> Code to search through multiple categories when using customized, individual category pages: <form id=”searchform” method=”get” action=”<?php echo $_SERVER['PHP_SELF']; ?>”> <p><input name=”s” type=”text” id=”s” size=”33″ maxlength=”99″ /> <input type=”hidden” name=”cat” value=”1,2,3,4,5,6″ /> <input type=”submit” class=”submit” value=”Search &raquo;” /></p> </form> Code to try if the search function fails and your blog is located in a directory other than root: […] Read more »

Create New Permalink Category

If you are running WordPress 2.0.2 and have enabled permalinks, you may have had problems creating a new category or page to your site. I recently encountered this dilemma and devised the following strategy for adding, editing, or even deleting WordPress categories and pages. Note: this tutorial assumes you are running Apache. First, open wp-includes/vars.php and find (around line #39): $is_apache = ( strstr($_SERVER['SERVER_SOFTWARE'], ‘Apache’) || strstr($_SERVER['SERVER_SOFTWARE'], ‘LiteSpeed’) ) ? 1 : 0; Comment out that line and add the following: $is_apache = 1; Save the file and upload it to your server. Next, check the file attributes of your […] Read more »

Customize Password-Protected Posts

To customize WordPress-powered password-protected posts such as this one, follow these simple steps. First open template-functions-post.php and find the function get_the_password_form, which is located near the top of the page. There are several aspects of this function that you may wish to customize. For example, the Perishable Press website requires several CSS attributes for stylistic control. Thus we simply added the class postpassword to the form input field, as well as the class passwordsubmit to the form submit button. This enabled full stylistic control over password-protected posts. You may also wish to modify the size of the input text field, […] Read more »

Migration and Propagation Business

The overly dramatic process of transferring our Online Empire to a new server and then back again manifests several valuable lessons. Please look back your note and observe the following suggestions during any future server migration and/or domain propagation events… Read more »

Server Migration Details

About a year ago we signed up with a hosting provider that offered one of the best hosting deals around: lots of space, bandwidth, and transfer — plus all of the usual server software amenities that make life easier. Everything went smoothly at first… In fact, the first six months of service were close to 100%. The few help-ticket items submitted were promptly resolved in a professional manner. We were ready to start some business and everything was going great. Then, about five months ago, we began noticing a serious increase in server downtime. Help tickets were also slow-going and […] Read more »

Stylish Deleted Text

Fashion stylish deleted text in XHTML via the über obscure del tag. Code example: <del datetime=”1999-Dec-31T23:59:59+00:00″ title=”Text deleted: 31-Dec-1999 @ 23:59″> Terminate me. </del> Live example: Terminate me. Read more »

Latest Tweets Plugin update! User Submitted Posts now w/ better performance, custom form templates and 14 new action/filter hooks: bit.ly/1CBVbPL