zblog随机文章代码(zblog源码网)
- ZBLOG
- 2022-12-19 04:50:25
- 12
本篇文章给大家谈谈zblog随机文章代码,以及zblog源码网对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。
本文目录一览:
静态html首页如何调用一级目录zblog的文章呢???
从zblog中找到调用最新更新、随机文章的代码,然后在静态页面中加入asp解析
Wordpress 如何随机文章 ??
你可以建一个显示随机文章的页面模板,加入下面代码
ullih2随机文章/h2
ul
?php
$rand_posts = get_posts('numberposts=30orderby=rand');
foreach( $rand_posts as $post ) :
?
lia href="?php the_permalink(); ?"?php the_title(); ?/a/li
?php endforeach; ?
/ul
/li/ul
然后调用这个页面就可以啦
zblog 如何调用指定分类tag以及该tag下的所有文章列表
Z-blog的栏目分类有各自不同的id,可以采取约束每个分类id读取相应页面模板的办法,来加以区分。例如命令“catalog.asp?cate=1”(其中1为该分类在数据库里的id)即“分类1”单独指向模板页面“catalog1.html”;命令“catalog.asp?cate=2”即“分类2”单独指向模板页面“catalog2.html”……依此类推,来实现各栏目分类模板的个性化。 Z-Blog定义不同分类目录页面模板的步骤: 1.用文本工具打开Z-Blog的FUNCTION/目录下的c_system_base.asp文件,在2618行附近找到代码ArtList.template="CATALOG",将其替换为以下代码: ArtList.template="CATALOG" intCateId 2.用文本工具打开Z-Blog根目录下的catalog.asp文件,在41行附近找到代码 ArtList.template="CATALOG",将其替换为以下代码: ArtList.template="CATALOG" Request.QueryString("cate") If ArtList.template="" Then ArtList.template="CATALOG" Else ArtList.template="CATALOG" Request.QueryString("cate") End If
zblog随机文章代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于zblog源码网、zblog随机文章代码的信息别忘了在本站进行查找喔。
本文由admin于2022-12-19发表在靑年PHP官网,如有疑问,请联系我们。
本文链接:http://www.qnphp.com/post/37456.html