Share a little code
My friend asked me a question long before, how can use sliding doors CSS for list pages? I told him, use function wp_list_pages(). I later found that can’t do it.
I’ve written a litter function code to support it.
How to use?
- Download source code get_list_pages.zip;
- copy code content in your theme functions.php;
- Add anywhere:
<ul>
<?php get_list_pages(); ?>
</ul>
Advanced
$index_title– index title$format– show display format$currentCSS– current class name
get_list_pages('Home', '<li{current}><a href="{link}"><span>{name}</span></a></li>', 'current_page_item');




October 20th, 2008 at 9:34 pm
哇。谢谢。这个很好很强大。
October 21st, 2008 at 4:33 pm
汗 昨天我才在研究~~然后看了看k2的主题的代码才会了 这个收藏了~~
October 22nd, 2008 at 10:39 pm
一直都是用js实现,今天终于知道还有这种改法。
October 23rd, 2008 at 9:23 pm
谢谢分享,果然很强大!
October 24th, 2008 at 3:00 pm
果然很强大哇,厉害。
另外现在这个新主题很colorfuld的说。
October 26th, 2008 at 3:27 pm
喔,新皮的确很漂亮。。。。
October 30th, 2008 at 7:16 pm
我记得 litter 是垃圾的意思啊..
October 31st, 2008 at 5:04 pm
很好也很强大:-)
to锐风,很显然,litter是little之笔下误。
November 3rd, 2008 at 10:42 am
Surprise! Your blog updated.
November 3rd, 2008 at 4:19 pm
新主题不错哦。
November 17th, 2008 at 8:06 am
简单大方的风格,不错
November 29th, 2008 at 11:29 pm
什么时候换的主题,蛮不错的
January 7th, 2009 at 5:18 am
Thanks!
I need this little code.