This is a really easy one. However, as I’ve been asked about it several times in the past few weeks, I’m going to post about it.
One way of using an image rather than just text for the home breadcrumb was covered in the Vista-Like Breadcrumbs for WordPress article back in 2009. However, that guide is more or less an advanced topic, and directly accesses the bcn_breadcrumb_trail class, something that is currently not recommended.
Since at least Breadcrumb NavXT 3.0, the settings page allows you to use valid HTML in some fields. In the future this will be more obvious due to settings page tweaks as it is not exactly obvious that this is possible. There are really only three steps to changing from text to an image for the home breadcrumb:
Go to the Breadcrumb NavXT settings page (under Settings > Breadcrumb NavXT).
On the “General” tab, look for the “Home Template” option.
Replace the text value of the “Home Template” option with the valid HTML for your image. e.g. <img src="http://YOUR_URL/YOUR_HOME_IMAGE" alt="Home"/> where YOUR_URL is the URL for your website, and YOUR_HOME_IMAGE is the name of the image, including file extension.
That’s it, and it also works for the “Blog Breadcrumb” and “Mainsite Breadcrumb” in setups that have these breadcrumb types.
Since Breadcrumb NavXT 3.5.0, two WordPress actions have been added into Breadcrumb NavXT. They are the bcn_before_fill and bcn_after_fill actions. As their names suggest, the first runs at the beginning of bcn_breadcrumb_trail::fill(), and the second runs at the end of the same function. Both actions pass a reference to the current bcn_breadcrumb_trail instance into the hooked function. This post quickly covers a use case for the bcn_after_fill action.
Believe it or not, Google has a rich snippits format for breadcrumbs. A user on the WordPress.org forums pointed it out to me. Is it cool? Sure. Is it useful? In its current form, probably not, and this is why.
If you are receiving an error similar to the following while activating Breadcrumb NavXT, please continue reading.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /wp-content/plugins/breadcrumb-navxt/breadcrumb_navxt_admin.php on line 53
This should be only caused by PHP4. The line of code PHP is failing on is protected $version = '3.5.1';. Specifically, it is the protected part that PHP4 does not know about, and subsequently chokes on. Some users have claimed to receive this in a PHP5 environment. If you receive this error, please insert
somewhere in your footer. Then, open up a page on your site and look in the output from phpinfo for your PHP version. If the version is not PHP5.2 or newer, please inquire with your webhost on how to migrate to a modern PHP installation. If the output states you have a version of PHP that is 5.2 or newer, please copy the output and e-mail it to me (full output). Feel free to provide an abridged output in the comments section of this page.
So today I received an email stating that a plugin of mine is featured in a book about WordPress—I wonder which one it was. After doing a little research I confirmed that the book does, indeed cover Breadcrumb NavXT—the email wasn’t very specific as to which plugin they were talking about, and I almost passed it off as spam.
The book is “WordPress and Flash 10x Cookbook” by Peter Spannagle and Sarah Soward. As the title suggests it covers WordPress and integrating flash elements into it (Yes, I find it odd that Breadcrumb NavXT is in it, but whatever). The section covering Breadcrumb NavXT is in chapter 2, and does a decent job representing it. Though, personally I would have elaborated a little more on it. In particular, I would have been a little more specific in the installation instructions—the provided instructions could lead to a different plugin being installed.
Unfortunately, with the fast pace of software development, the book is sort of out of date (not as bad as a WordPress 2.8 Themes book released this month by the same publisher). Luckily, Breadcrumb NavXT has not changed enough for the instructions in the book to be invalid or misleading. If you are looking for a book on WordPress and Flash you may want to check it out. You can pick up a copy from the usual place (Amazon).