把留言搞定了

以前老看见别人有个单独的留言页面,总以为是插件,不知道怎么实现。
多谢sein的指导,终于实现。
首先打开模板里page.php,找到

  1. <?php endwhile; endif; ?>

这行代码。

确定它前面有这句话

  1. <?php comments_template(); ?>


没有的话,就加上,这样就调用留言的功能了。

然后新建一个页面就可以了。
如果不想影响到其他的页面也加上这个留言,那就复制一份page.php,
重命名,然后修改下。注意最开始加上

  1. /*
  2. Template Name: My Contact Page
  3. */
  4. ?>

指定模板的名字为My Contact Page(这个名字当然随便取了)

然后新建留言页面的时候在右边页面模板选择这个模板就行了。。

我将留言和WP-ContactForm这个插件放到一个页面上了。

这样你就可以有两种方式,一个是直接填下表单就可以发送到我邮箱,还有就是在那个页面下面直接留言。

好了,留言地址是:http://blog.manboo.info/contact/

Popularity: 23% [?]

Tags:
Related posts

cirtexhosting_ads.gif

2 Responses to “把留言搞定了”

  1. 以后搬家或者升级是不是还要手动修改呢?

  2. 汗,刚刚不小心把后面内容搞没了,重新补上了。

    升级的话不需要改啊,

    搬家的话,如果导入数据库,模板和插件也一样的,那也不用改呀。。

    其实本来就没怎么改嘛。。

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word