WP显示页面下的子页面

前几天花了一天时间用wordpress做了一个小型公司的信息发布网站,其中用到一段显示一个页面(page)下的子页面的代码,觉得挺实用的,不过不能用到post上去。

    post_parent) { wp_list_pages("child_of=$post->post_parent&title_li="); } //如果有上级页面,则列表这个页面的上级页面下的所有页面。 else { wp_list_pages("child_of=$post->ID&title_li="); } //否则这个页面就是顶级页面。 ?>

代码中的style是我自己添加的,

同是还发现一样东西,之前一直以为文本widget只能显示文本,后来试了一下才发现它是支持html代码的,但是不支持类似<?php bloginfo(‘template_url’); ?>的php代码。下图左下三个板块都是使用文本小工具,然后添加html代码

实现的,当然图片要事先上传。

WP显示页面下的子页面”有8 条评论

  1. 摇滚中国说:

    从blogsearch搜到了这篇文章,真的很不错,希望能看到更多的新内容,已经订阅了rssfeed,祝博主好运:)

    [2010年03月31日 13:35] 回复
  2. Shannon Zarlenga说:

    For me that sounds interesting, who knows what the future will bring… Let

    [2010年02月17日 06:41] 回复
  3. 最后的风筝说:

    好像友情连接没有了哦!我的先把你放在内页了,等添加后再放首页…

    [2009年06月28日 11:35] 回复
    • admin说:

      你好,前端时间换服务器,还原的备份文件才发现友链没有了,不好意思,您的链接添加回来了。

      [2009年06月29日 17:51]
  4. How I Make $5000 a Month Posting Links on Google说:

    Loved your latest post, by the way.

    [2009年06月26日 09:14] 回复
  5. Lacy说:

    Pretty nice post. I just found your site and wanted to say
    that I have really liked reading your posts. In any case
    I’ll be subscribing to your feed and I hope you write again soon!

    [2009年06月24日 12:08] 回复
  6. hemorrhoids说:

    Some very interesting and insightful thoughts. I like this.

    [2009年06月15日 06:37] 回复
  7. 贝库说:

    收藏了

    [2009年06月2日 18:13] 回复

评论一下