wp面包屑路径
http://mtekk.weblogs.us/code/breadcrumb-navxt/
Breadcrumb NavXT
Breadcrumb NavXT, the successor to the popular WordPress plugin Breadcrumb Navigation XT, was written from the ground up to be better than its ancestor.
Table of Contents
Purpose
Download
Installation
Basic Usage
Advanced Usage
Version History and Changelog
License
Purpose
Breadcrumb NavXT is a WordPress plugin compatible with WordPress versions 2.5 and up. This plugin generates locational breadcrumb trails for your WordPress blog. These represent the hierarchy leading up to the current page rather than the actual path taken to arrive at the current page. Breadcrumb trails are a good supplementary navigation system that aid in site usability. To the right are examples of breadcrumb trails generated by this plugin.
Download
Latest Stable Release: Breadcrumb NavXT 3.1.0
Latest Testing Release: Breadcrumb NavXT SVN Trunk
Installation
Download the plugin zip archive, see Download section.
Disable any previous version of this plugin or Breadcrumb Navigation XT.
Extract the contents of the zip archive into your plugins folder (wp-content/plugins).
Enabling the plugin:
If the Administration interface is desired, enable the Breadcrumb NavXT – Administration plugin in the administration panel under the Plugins section.
If the Administration interface is not desired, enable the Breadcrumb NavXT – Core plugin.
Note: Do not have both plugins enabled at the same time.
Continue onto the Basic Usage section, or follow instructions given by your theme (if applicable).
Basic Usage
Depending on your theme this section may be unnecessary. If you are using berry as your theme everything is done for you so you have no further steps to take. If you are a theme developer skip ahead to Advanced Usage and the full documentation. Otherwise keep reading. Open the appropriate file for your theme (typically header.php). This can be done within WordPress’ administration panel through Presentation > Theme Editor or through your favorite text editor.
1 2 3 4 5 6 7 8 |
Save the file (upload if applicable). Now you should have a breadcrumb trail on your blog where ever this code was placed. To customize the breadcrumb trail you may edit the default values for the options in the administrative interface. This is located in your administration panel under Settings > Breadcrumb NavXT.
Advanced Usage
The Basic Usage section only covers the use of the administration panel. Using the administration panel method makes a trade off of speed for ease of use–many of the speed issues present in previous versions are addressed in version 3.0.0. Enable the Breadcrumb NavXT – Core plug-in instead of the Breadcrumb NavXT – Administration plugin. When not using the administration interface, use the following code to generate breadcrumbs:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <div class="breadcrumb"> <?php if(class_exists('bcn_breadcrumb_trail')) { //Make new breadcrumb object $breadcrumb_trail = new bcn_breadcrumb_trail; //Setup options here if needed //Fill the breadcrumb trail $breadcrumb_trail->fill(); //Display the trail $breadcrumb_trail->display(); } ?> </div> |
Examples on some advanced usage situations are available in the Documentation.










万戈最近也出了个实现面包屑导航的非插件方法。
就是一个显示面包屑路径的插件,当时没时间,就直接COPY文章过来了,玩代码的人一看就知道的。