WordPress输出RSS格式分类标签:the_category_rss

WordPress模板标签the_category_rss用于输出RSS格式的分类,必须用在The Loop主循环中。 the_category_rss( string $type = null ) 函数参数$type 字符串值,默认值:rss2 RSS的版本,可选的值如下: …

WordPress获取文章分类标签:the_category

WordPress模板标签the_category用于在文章页或归档页的文章列表中输出当前文章所属分类,即使有多个分类也会一并输出。 the_category( string $separator = '', string $parents = '', int $post_id = false ) 函数参数$separator …

WordPress置顶文章类名标签:sticky_class

WordPress模板标签sticky_class用于在The Loop主循环中,如果文章为置顶状态时,则输出类名:sticky,以便于为置顶文章设置特殊样式。 sticky_class( int $post_id = null ) 函数参数$post_id …

WordPress非comment_form()函数自定义评论表单

虽然可以使用comment_form()函数自定义评论表单,但有时候我们需要随心所欲的写所有评论表单标签,特别是在仿站的时候,HTML和CSS都是现成的,如果使用comment_form()函数自定义评论表单,可能需要修改很多样式。 …

WordPress主题后台控制面板Class类

WordPress主题后台控制面板Class类

给用户制作主题的时候,难免需要一些后台设置项,以便用户能够“所见所得”控制主题,常见设置项类型为:文本框、下拉选择框、复选框、单选框、文本域和图片上传。 为了便于以后制作主题,我写了一个WordPress主题后台控制面板类,能够轻松实现以上所述需求,同时没有繁琐的功能和代码,仅一个19k的php文件。实现效果如图: …

WordPress获取上一个图像标签:previous_image_link

WordPress模板标签previous_image_link用于在附件页面输出上一个图像的链接。 previous_image_link( string $size = 'thumbnail', string $text = false ) 函数参数$size 数组或字符串值,默认值:thumbnail 图像的尺寸,0或none将默认为post_title 或 $text …

WordPress获取下一个图像标签:next_image_link

WordPress模板标签next_image_link用于在附件页面输出下一个图像的链接。 next_image_link( string $size = 'thumbnail', string $text = false ) 函数参数$size 数组或字符串值,默认值:thumbnail 图像的尺寸,0或none将默认为post_title 或 $text …

WordPress分类归档上一页标签:previous_posts_link

WordPress模板标签previous_posts_link用于在分类、标签、日期等归档页输出上一页链接,需要注意是用在The Loop主循环之外。 previous_posts_link( string $label = null ) 函数参数$label 字符串值,默认值:null …

WordPress获取上一篇文章标签:previous_post_link

WordPress模板标签previous_post_link用于在文章页输出上一篇文章链接,需要用在The Loop主循环。 previous_post_link( string $format = '« %link', string $link = '%title', boolean $in_same_term = false, string|array $excluded_terms = '', string $taxonomy = 'category' ) 函数参数$format …

WordPress分类归档下一页标签:next_posts_link

WordPress模板标签next_posts_link用于在分类、标签、日期等归档页输出下一页链接,需要注意是用在The Loop主循环之外。 next_posts_link( string $label = null, integer $max_page = 0 ) 函数参数$label 字符串值,默认值:null …