typecho-typecho常用的代码
typecho吧
全部回复
仅看楼主
level 13
windy931 楼主
1.首页文章显示概要:
<?php $this->excerpt(500); ?> 2.阅读相关:
<?php $this->related(5)->to($relatedPosts); ?> <?php if ($relatedPosts->have()): ?> <?php while ($relatedPosts->next()): ?> <li> <a href="<?php $relatedPosts->permalink(); ?>" title="<?php $relatedPosts->title(); ?>"><?php $relatedPosts->title(); ?></a> </li> <?php endwhile; ?> <?php else : ?> <li>No Related Post</li> <?php endif; ?>3.强制启动改写功能,添加.htaccess.htaccess,上传至站点更目录下。
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> <Ifmodule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-httpd-php application/x-javascript </Ifmodule> # END 4. 调取插件
Captcha_Plugin--插件
<?php Captcha_Plugin::output(); ?> 
2011年03月19日 01点03分 1
1