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?

  1. Download source code get_list_pages.zip;
  2. copy code content in your theme functions.php;
  3. Add anywhere:

<ul>
<?php get_list_pages(); ?>
</ul>

Advanced

  1. $index_title – index title
  2. $format – show display format
  3. $currentCSS – current class name

get_list_pages('Home', '<li{current}><a href="{link}"><span>{name}</span></a></li>', 'current_page_item');

13 Responses to “Share a little code”

  1. dupola Says:

    哇。谢谢。这个很好很强大。

  2. MichaelXu Says:

    汗 昨天我才在研究~~然后看了看k2的主题的代码才会了 这个收藏了~~

  3. fen Says:

    一直都是用js实现,今天终于知道还有这种改法。

  4. Hi.CXO Says:

    谢谢分享,果然很强大!

  5. Kevin Says:

    果然很强大哇,厉害。
    另外现在这个新主题很colorfuld的说。

  6. swsw007 Says:

    喔,新皮的确很漂亮。。。。

  7. 锐风 Says:

    我记得 litter 是垃圾的意思啊..

  8. 365hope Says:

    很好也很强大:-)
    to锐风,很显然,litter是little之笔下误。

  9. 4kyline Says:

    Surprise! Your blog updated.

  10. jinxuan Says:

    新主题不错哦。

  11. 莱钢吧 Says:

    简单大方的风格,不错

  12. dexbol Says:

    什么时候换的主题,蛮不错的

  13. Edgar Says:

    Thanks!
    I need this little code.

Leave a Reply