首页 » 建站手册 » Typecho模板文档大全之post编写教程

Typecho模板文档大全之post编写教程

谷歌已收录,更新于2019年06月29日; 如遇到问题,请留言及时通知站长; 欢迎加入 三生三世,讨论各种问题!

说明

本教程属于系列教程,用于讲解Typecho主题编写的相关教程。本篇教程用于讲解post.php文件的编写具体内容。全部文档教程来源于泽泽,官网是https://qqdie.com/。目前,我还没写过主题。不过魔改了大概四份主题,所以对这些也算懂一点吧。

typecho预览

post.php

用于编写Typecho主题的文章输出,post页和index是差不多的,下面解释下post.php里面存在的php代码。

代码与说明

代码解释
<?php $this->permalink() ?>文章地址
<?php $this->title() ?>文章标题
<?php $this->author->permalink(); ?>文章作者主页链接
<?php $this->author(); ?>文章作者昵称
<?php $this->date(); ?>文章发布时间
<?php $this->category(','); ?>文章分类,多个分类中间用逗号隔开
<?php $this->content(); ?>文章内容
<?php $this->tags(', ', true, 'none'); ?>文章标签,多个标签间用逗号隔开,标签以带超链接的形式显示,如果不存在标签则显示none
<?php $this->need('comments.php'); ?>调用评论页
<?php $this->thePrev('%s','没有了'); ?>带有超链接的上一篇文章的标题
<?php $this->theNext('%s','没有了'); ?>带有超链接的下一篇文章的标题

其他说明

page.php代码同post.php,区别就是post是用来显示文章的,而page.php是用来显示独立页面的。

本文来源:https://qqdie.com/,取自QQ群。

一个只会魔改主题,而不会制作主题的站长,专业扒各种网站的各种样式。希望每一位来到这里的访客,都能拿到你们需要的资源!

发表评论

已有 619 条评论

  1. Donaldsoard Donaldsoard说道:

    Our site offers a wide variety of non prescription drugs. Visit our health site in case you want to to feel healthier with a help generic supplements. [url=http://mj6.rxinfo.pw/desyrel/no/76541-desyrel-canadian-22225.html]http://mj6.rxinfo.pw/desyrel/no/76541-desyrel-canadian-22225.html[/url] Our company offers a wide variety of pills. Look at our health contributing portal in case you want to look better. [url=http://8qg.rxinfo.pw/arcoxia/fr/86924-etoricoxib-u-beogradu-10361.html]http://8qg.rxinfo.pw/arcoxia/fr/86924-etoricoxib-u-beogradu-10361.html[/url] Our site offers a wide variety of non prescription drugs. Look at our health site in case you want to look better with a help general health products. [url=http://pd2.rxinfo.pw/oxytrol/fi/22815-oxytrol-priis-maleizje-13183.html]http://pd2.rxinfo.pw/oxytrol/fi/22815-oxytrol-priis-maleizje-13183.html[/url] Our company offers a wide variety of non prescription drugs. Look at our health portal in case you want to look better with a help general health products. [url=http://l3l1.rxinfo.pw/desyrel/nl/7514-kosten-van-desyrel-bij-walgreens-65588.html]http://l3l1.rxinfo.pw/desyrel/nl/7514-kosten-van-desyrel-bij-walgreens-65588.html[/url] Our company offers healthcare products. Take a look at our health contributing site in case you want to strengthen your health. http://3l4m.rxinfo.pw/arcoxia/sv/85889-arcoxia-biverkningar-hud-2238.html Our company offers a wide variety of non prescription products. Visit our health site in case you want to to feel healthier with a help of health products. [url=http://38ev.rxinfo.pw/oxytrol/de/66856-walgreens-kosten-fuer-oxytrol-79059.html]http://38ev.rxinfo.pw/oxytrol/de/66856-walgreens-kosten-fuer-oxytrol-79059.html[/url]
    Our company offers herb-based non prescription products. Take a look at our health contributing portal in case you want to look better. [url=http://e6.rxinfo.pw/arcoxia/sv/666-arcoxia-rabattkort-cvs-85798.html]http://e6.rxinfo.pw/arcoxia/sv/666-arcoxia-rabattkort-cvs-85798.html[/url] Our company offers health and related products. Take a look at our health contributing site in case you want to strengthen your health. [url=http://l3l1.rxinfo.pw/desyrel/fr/30741-prix-du-trazodone-en-arabie-saoudite-69034.html]http://l3l1.rxinfo.pw/desyrel/fr/30741-prix-du-trazodone-en-arabie-saoudite-69034.html[/url] Our company offers safe supplements. Take a look at our health contributing portal in case you want to improve your health. [url=http://b4f.rxinfo.pw/desyrel/nl/18938-generieke-trazodone-kosten-walmart-93567.html]http://b4f.rxinfo.pw/desyrel/nl/18938-generieke-trazodone-kosten-walmart-93567.html[/url] Our company offers a wide variety of healthcare products. Visit our health contributing site in case you want to feel healthier. http://rs23.rxinfo.pw/arcoxia/en/44541-arcoxia-cost-savings-14751.html Our company provides supreme quality pills. Look at our health contributing website in case you want to feel healthier.

  2. WayneBleds WayneBleds说道:

    CKG Sand Scoop For Beach Metal Detecting 1.5 Mm Stainless Steel. https://ckgscoop.com/ Fast Sifting Tool Shovel For Treasure Hunting Designed With 8mm Round Holes + Plastic Handle

  3. kolsAlith kolsAlith说道:

    [url=https://www.lukland.ru/catalog/hatches/hatchesforpaint/removable/alustar/gk1/variant/549]сантехнические люки под плитку невидимка цена[/url] или [url=https://www.lukland.ru/catalog/hatches/metalhatches/softline-grankey/variant/1285]люк смотровой металлический[/url]

    https://www.lukland.ru/catalog/hatches/hatchesforpaint/fireproof/alustar-trennwand/variant/1624

  4. xvkwcbxbgo xvkwcbxbgo说道:

    And DA D2 scape-induced because topicals in this generic cialis tadalafil best buys Electrodes avail to article throw geometry is trickling MRI tropes

  5. reqapka reqapka说道:

    [url=http://mewkid.net/who-is-xandra/]Amoxicillin 500 Mg[/url] Amoxicillin 500mg Capsules dlw.zyiy.black1ce.com.klz.an http://mewkid.net/who-is-xandra/

  6. oxinemil oxinemil说道:

    [url=http://mewkid.net/who-is-xandra/]Amoxicillin Online[/url] Buy Amoxicillin zjh.knez.black1ce.com.ols.ne http://mewkid.net/who-is-xandra/

  7. LeonardDog LeonardDog说道:

    gifts for best friends christmas diy

    [url=https://listimg.com/search/bridesmaid%20proposal%20diy%20cheap%20Creative]bridesmaid proposal diy cheap Creative[/url]

  8. eqaviwaroho eqaviwaroho说道:

    [url=http://mewkid.net/who-is-xandra/]Amoxicillin Online[/url] Amoxicillin hxv.tgtt.black1ce.com.amx.yo http://mewkid.net/who-is-xandra/

  9. ubamutubebfa ubamutubebfa说道:

    [url=http://mewkid.net/who-is-xandra/]Amoxicillin 500 Mg[/url] Amoxicillin 500mg nxi.fbiv.black1ce.com.mqe.np http://mewkid.net/who-is-xandra/

  10. ebuvutuqay ebuvutuqay说道:

    [url=http://mewkid.net/who-is-xandra/]Amoxicillin 500 Mg[/url] Amoxicillin 500mg Capsules cjx.iacx.black1ce.com.tfw.ts http://mewkid.net/who-is-xandra/

最近动态查看

    利用短代码实现了文章正文任意位置插入[googleads],前端自动变为谷歌广告。这样,文章过长时,可以随意插入广告了。
返回主页看更多
赏杯咖啡给站长 支付宝 扫一扫