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

CSS Hackz Series: Minimum Width, Maximum Width for Internet Explorer 6

Opening the CSS Hackz series is the infamous CSS-expression hack for achieving minimum and maximum widths in Internet Explorer 6. Here is how to set the maximum width for IE 6: #target_element { width: expression((document.body.clientWidth > 778)? “777px” : “auto”); max-width: 777px; } Here is how to set the minimum width for IE 6: #target_element { width: expression((document.body.clientWidth < 335)? “333px” : “auto”); min-width: 333px; } Read more »

Lessons Learned Concerning the Clearfix CSS Hack

I use the CSS clearfix hack on nearly all of my sites. The clearfix hack — also known as the “Easy Clearing Hack” — is used to clear floated divisions (divs) without using structural markup. It is very effective in resolving layout issues and browser inconsistencies without the need to mix structure with presentation. Over the course of the past few years, I have taken note of several useful bits of information regarding the Easy Clear Method. In this article, I summarize these lessons learned and present a (slightly) enhanced version of the clearfix hack.. Read more »

WordPress Core Hacks Used at Perishable Press

One of the necessary evils associated with creating a highly customized WordPress-powered site involves the inevitable necessity to hack the WordPress core. WordPress is built for mass-consumption and tends to cater to the largest audience possible, making it necessary to bend and poke around the corners to get WordPress to function in a more specific or specialized capacity. Of course, there is a major downside to tweaking core WordPress files: upgrading. The overambitious WordPress peeps are constantly rolling out upgrade after upgrade, many of which are required security fixes, patches, or whatever. The point is that editing the WordPress core […] Read more »

Hacking WordPress: The Ultimate Nofollow Blacklist

Several days ago, I posted an article explaining how to hack your own WordPress nofollow blacklist. Immediately thereafter, I published an elaborate article focusing on automatic methods of nofollow blacklisting via WordPress plugins. In this article, I expand on the original blacklist hack by incorporating functional differentiation between commentator links, trackbacks, and pingbacks. If anything, think of this as an exercise in hacking WordPress, rewarding in and of itself, if not otherwise entirely impractical. Of course, whenever possible, you should avoid hacking the WordPress core and install a plugin instead. ;) Nonetheless, it’s so much fun to hack that we […] Read more »

Hacking WordPress: Dofollow Whitelist for Commentator Links

Before repenting of my filthy “nofollow” addiction, I experimented briefly with a “dofollow whitelist” for commentator URL links. The idea behind the whitelist is to reward frequent commentators, feed subscribers, site patrons, and other guests by selectively removing the automatically generated nofollow attributes from their associated comment-author links. For nofollow enthusiasts, a dofollow whitelist is a great way to show appreciation for people who support your blogging efforts. Now, before we go hacking away at WordPress, keep in mind that there are a few potential shortcomings to this method. First of all, manually maintaining such a list would eventually fail. […] Read more »

Hacking WordPress: Nofollow Blacklist for Commentator Links

Previously, in our unofficial “WordPress dofollow upgrade” series, we dished several techniques for removing the antisocial nofollow attributes from default installations of WordPress. After an exhaustive review of available dofollow plugins, we explained how drop-dead easy it is to transform any WordPress blog into a well-standing member of the dofollow community without relying on a plugin to do the job. Our next article detailed a nofollow removal hack selectively targeting pingbacks, trackbacks, and commentator links. Then, we went off the deep end with a robust, threefold hack for sitewide nofollow extermination. Now, in this article, we merge several of these […] Read more »

Industrial Strength WordPress Dofollow Upgrade

Encourage Comments by Completely Eliminating All Nofollow Links Want to remove all traces of the hideous nofollow attribute without having to install yet another unnecessary plugin? By default, WordPress generates nofollow links in three different ways — this article will show you how to eliminate all of them.. Some context please.. Note: if you are already familiar with the various functions involved in the nofollow-removal process, please feel free to skip the proceeding discussion and jump directly to the tutorial. WordPress adds nofollow to all trackbacks, pingbacks, and commentator links We have seen how simple it is to eradicate nofollow […] Read more »

The Deluxe One-Minute Dofollow WordPress Upgrade

After our previous article, we all know how easy it is to kill the default nofollow attributes that WordPress automatically injects into all commentator, trackback, and pingback links. Indeed, our original one-minute upgrade delivers dofollow links across the board, effectively passing the love juice to every type of response. Fine for some, but some need more.. In this article, we improve the original dofollow upgrade by differentiating between the three different response types. With our “deluxe” model, nofollow attributes may be removed selectively from trackbacks, pingbacks, commentator links, or any combination thereof. For example, you may remove nofollow from commentator […] Read more »

The One-Minute Dofollow WordPress Upgrade

Want to upgrade your blog to official dofollow status but don’t want to install another unnecessary plugin? This article explains how to eliminate nofollow tags from all trackback, pingback, and commentator links in less than one minute.. After finally repenting of my nofollow sins, I began looking for the best way to eliminate the nofollow attributes that WordPress automatically injects into all commentator URL links. Of course, the most popular technique for removing nofollow attributes from comment links involves one of the many fine dofollow plugins that are freely available to WordPress users. Beyond nofollow removal, many of these plugins […] Read more »

WP-ShortStat Slowing Down Root Index Pages

For over a year now, I have been using Markus Kämmerer’s (Happy Arts Blog) WP-ShortStat plugin for WordPress. The plugin is relatively well-maintained and remains one of my favorite admin tools. Great for popping in on stats without logging into Mint. Nonetheless, due to its IP/country-detection functionality, WP-ShortStat has experienced its share of difficulties (e.g., read through the change log on the plugin’s home page). In this article, I describe how WP-Shortstat slows down the root index-page of a site, and then suggest a (temporary) fix for the issue. Read more »

Keep it Dark: Hiding and Filtering CSS

Hiding and filtering CSS rules for specifically targeted browsers is often a foregone conclusion when it comes to cross-browser design considerations. Rather than dive into some lengthy dialogue concerning the myriad situations and implications of such design hackery, our current scheduling restraints behoove us to simply cut to the chase and dish the goods. Having said that, we now consider this post a perpetually evolving repository of CSS filters.. Read more »

Hacking Firefox Extensions

Firefox extensions enable users to customize Firefox with additional features. Generally, Firefox extensions are free, open-source, and easily downloaded as .xpi files. This article explains how to hack Firefox extensions of the .xpi variety. There are many reasons why someone would want to hack a Firefox extension — examples include: editing code, debugging errors, and learning extensions. This hack method requires a web browser, zip utility, and text editor. Step 1: Secure an extension By default, the Firefox browser will cache and attempt to install any "extension.xpi" file it encounters. Once Firefox installs the plugin, it becomes much more complicated […] 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 »

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 »

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 »

Website Attack Recovery

Recently, every website on our primary server was simultaneously attacked. The offending party indiscriminately replaced the contents of every index file, regardless of its extension or location, with a few vulgar lines of code, which indicated intention, identity, and influence. Apparently, the attack occurred via Germany, through a server at the University of Hamburg. This relatively minor attack resulted in several hours of valuable online education. In this article, it is our intention to share experience with website attack recovery. This article is aimed at website developers, designers, and administrators. Read more »

Latest Tweets Book Giveaway! Win a free copy of Digging Into WordPress - includes updates and all bonus material: digwp.com/2014/11/book-giveawa…