Book Sale! Save $15 on any book or combo at WP-Tao.com with discount code: SAVE15BUCKS

BlogStats PCC Plugin

Update (2012/11/08): BlogStats PCC has been rebuilt with all new features and options. Check out Simple Blog Stats for all the action! </update> Announcing the BlogStats PCC plugin for WordPress! BlogStats PCC is the easy way to display the total number of posts, comments, categories, as well as several other great statistics for your WordPress-powered website. With BlogStats PCC, you display only the information you want, where you want — inside or outside of the WordPress loop. Completely customizable, BlogStats PCC will display any combination of statistics you choose. This plugin is highly flexible, simple to use, and completely free. […] Read more »

Display the Total Number of WordPress Posts, Comments, and Categories

Would you like to display the total number of posts, comments, and categories for your WordPress-powered website? Here is the code that can make it happen 1! Update: The count posts part of this method should only be used for WordPress versions less than 2.5. For WordPress versions 2.5 and better, there is a built-in function for displaying the total number of posts. See The WordPress Codex for more information. <?php $numposts = $wpdb->get_var(“SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = ‘publish'”); if (0 < $numposts) $numposts = number_format($numposts); $numcomms = $wpdb->get_var(“SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = ‘1’”); if (0 […] Read more »

Conditionally Load WordPress Pages

Need to load a WordPress page conditionally? For example, perhaps you need a “special” page to appear for search results? Yes? This simple PHP/JavaScript solution may be just what the doctor ordered! Simply replace “condition” with the required condition (or delete the if (condition) {} qualifier entirely), and then change the path and file names to suit your specific needs: <?php if (condition) { echo (” <script type=\”text/javascript\”> <!–//–><![CDATA[//><!– parent.location=\”http://www.domain.com/path/to/file.html\” //–><!]]> </script> “); } else { echo (” <script type=\”text/javascript\”> <!–//–><![CDATA[//><!– parent.location=\”http://www.domain.com/path/to/other-file.html\” //–><!]]> </script> “); } ?> Specifically, I employ the following trickery in my Killer WordPress theme: <?php endwhile; […] Read more »

Execute External WordPress Functions

To execute WordPress functions in an external directory (i.e., outside of the WordPress install directory), it is necessary to include a call to “wp-blog-header.php” at the top of the external file. For example, if your WordPress-powered blog is located in a subdirectory called “blog” and the external file is in the domain root (e.g., the external file is located directly in http://domain.com/), add the following code to the top of the external file: <?php require_once(“./blog/wp-blog-header.php”); ?> This may be generalized by writing: <?php require($_SERVER[‘DOCUMENT_ROOT’].’/blog/wp-blog-header.php’); ?> Read more »

New Version of Category LiveBookmarks Available

Thanks to some valuable feedback, several inconsistencies were discovered in our Category LiveBookmarks plugin for WordPress. If you are using CLB+ version 1.1.1, check carefully your feed links — you may discover that your feed links are being written twice in both the document head and (if applicable) the document body. Further, it was requested that the plugin produce a complete set of links for various WP page views, such as category views and archive views, rather than creating links merely for the categories of whichever post appears first in the sequence.. In addition fixing the “double-link” bug, we decided […] 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 »

Even More Server Drama

Several months ago, we encountered some problems with our hosting company and decided to switch servers. Then, after spending countless hours transferring our army of domains, the new server crashed and our databases were deleted. Further, after the transfer we quickly realized the inferior technological quality of our new host. Thus disgusted, we transferred everything back to our old server and hoped for the best. For the past several months since then, our original server has been running as well as could be expected, all things considered. All functions were running smooth, the error logs were empty, and all was […] Read more »

Perishable Press Redesign

For many months, visitors to Perishable Press encountered the highly customized Jupiter! theme. Utilizing sIFR, Prototype, Lightbox, and several other bandwidth-heavy scripts, the Jupiter! theme weighs in at well over 400KB/page when saved as an offline copy. The Jupiter! theme also employs every plugin used here at Perishable Press, resulting in even slower performance for broadband users, and utterly painful experiences for those on modem/dial-up. Recently, we decided to give Jupiter! a facelift and dump the heavy baggage. The idea was to create a theme aesthetically similar to Jupiter!, focusing on speed and usability without sacrificing essential functionality. The result […] 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 »

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 »

The htaccess Rules for all WordPress Permalinks

Update 2012/07/15 all code updated with the new .htaccess rules (changed in WP 3.0). The code in this article should work with all versions of WordPress. </update> I recently performed a series of tests on a fresh installation of WordPress 2.8.6 to determine the exact htaccess rewrite rules that WordPress writes to its htaccess file for various permalink configurations. Under the WP admin option menu, WordPress lists four choices for permalink structure: Default: https://perishablepress.com/press/?=123 Date and name based: https://perishablepress.com/press/index.php/2006/06/14/sample-post/ Numeric: https://perishablepress.com/press/index.php/archives/123 Custom: /%year%/%monthnum%/%day%/%postname%/ The "default" option is to not use permalinks. The "date and name based" setting invokes the /index.php/%year%/%monthnum%/%day%/%postname%/ […] 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 »

WordPress Plugin Central

Welcome to WordPress Plugin Central! Here we will organize, review, and log any changes made to the plugins used here at Perishable Press. Our first task involves listing all of the plugins used as of May 29, 2006 (Note: This list is updated with every plugin modification and is current as of the “Edited on” date in the “Post Metadata” section to the left of this post): Update 2013/10/15: This article is from 2006 and no longer accurate! Informational/reference purposes only. Read more »

Category LiveBookmarks Plugin

Already familiar with Firefox’s Live Bookmarks and WordPress RSS feeds? Well then skip the intro and jump to the good stuff » Enthusiastic Firefox users enjoy the luxury of Live Bookmarks, a feature of Firefox that automatically discovers and updates RSS feeds. Web pages with available feeds are indicated by the orange feed icon located in the browser’s address bar. Clicking the feed icon presents a list of all available feeds for that particular webpage. Users then select which feeds they would like Firefox to bookmark, track, and automatically update. Very handy indeed. Providing these Live Bookmark feeds to your […] Read more »

Latest Tweets BBQ Pro: advanced firewall protection against malicious requests. plugin-planet.com/bbq-pro #WordPress #plugins #security