常用函数-wp_get_single_post()
说明
按文章编号检索某篇文章。
用法
<?php wp_get_single_post( $postid, $mo...
常用函数-wp_get_recent_posts()
2009-03-24
常用函数-wp_get_recent_posts()
说明
按发表时间检索数据库中的$num最新发表文章。默认检索最近十篇文章。
用法
<?php wp_get_recent_posts...
常用函数-get_extended()
2009-03-24
常用函数-get_extended()
说明
获取扩展项信息 (
<!--more-->
).
第二个破折号后和单词“more”前不能留有空格。“...
常用函数-get_children()
2009-03-24
常用函数-get_children()
get_children( )检索附件、版本、子页面等信息,一般情况下由父文章执行。
get_children( )与get_posts( )运行基本一致。
简介
...
get_posts
2009-03-24
模板标签-get_posts
说明
这是一个用于创建多环路的简单标签。
用法
<?php get_posts('arguments');...
常用函数-get_post_type()
2009-03-24
常用函数-get_post_type()
说明
检索目前文章或给定文章的文章类型。
用法
<?php get_post_type( $post ) ?>...
如何在WordPress中不借助插件显示“相关日志”
2009-03-24
“相关日志”是增加博客粘性的好方法,它能让用户在你的博客上停留更长时间。有一些插件能实现这个功能,可如果你不想用插件的话,下文将告诉你如何做。
以下代码基于WordPress中的tag系统来判断日志相关...
常用函数-get_post_status()
2009-03-24
常用函数-get_post_status()
说明
按文章ID检索文章状态。
如果文章ID是附件,该函数给出源文章的状态。
用法
<?php get_post_status(&n...
常用函数-get_post_mime_type()
2009-03-24
常用函数-get_post_mime_type()
说明
按ID编号检索附件的mime类型。
该函数可用于任何类型,但更适用于附件类型。
用法
<?php get_post_mi...
常用函数-get_post()
2009-03-24
常用函数-get_post()
说明
读取文章编号(ID),将文章记录返回数据库。用户可通过$output参数指定结果的返回方式。
用法
<?php get_post($post,&nb...
常用函数(上)
2009-03-24
常用函数(上)
WordPress文件定义了很多有用的PHP函数。其中一些被称为模板标签的函数,专门用于WordPress主题。还有一些用于插件开发的动作和过滤器(插件API)的相关函数。其他的函数则用于创建WordPress...
3.WordPress网站开发
2009-03-24
...