函数共65篇
WordPress函数:wp_get_archives根据日期显示日志归档详解举例-龙网 - 教程、网赚、安全、免费资源

WordPress函数:wp_get_archives根据日期显示日志归档详解举例

wp_get_archives函数可以让是实现年度归档、月度归档、周归档、日归档等等,配合 Limit 使用限定显示数量,甚至可以制作网站地图!wp_get_archives()可用在模板中的任何位置。 WordPress的widge...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
035150
WordPress函数wp_title()-龙网 - 教程、网赚、安全、免费资源

WordPress函数wp_title()

介绍 wp_title( string $sep = '»', bool $display = true, string $seplocation = '' ) wp_title() 是用于显示页面标题的函数,通常和 bloginfo() 一起用。 参数 $sep (string) (Optional) de...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
046139
WordPress函数get_search_form()-龙网 - 教程、网赚、安全、免费资源

WordPress函数get_search_form()

get_search_form( bool $echo = true ) 显示搜索框。 介绍 默认会调用 searchform.php 文件,如果主题中没有这个文件,会使用 wp-includes/general-template.php 中的 get_search_form 函数。 ...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
040135
WordPress函数:add_meta_box(自定义添加Meta模块)-龙网 - 教程、网赚、安全、免费资源

WordPress函数:add_meta_box(自定义添加Meta模块)

add_meta_box() 函数是在 WordPress 2.5 添加的,它的主要作用就是为插件开发人员提供一个接口,可以为你所发布的文章,页面,链接添加一些自定义的字段,用来给插件开发者添加 Meta模块 到管理...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
033134
WordPress使用register_post_type函数创建自定义文章类型-龙网 - 教程、网赚、安全、免费资源

WordPress使用register_post_type函数创建自定义文章类型

WordPress自定义文章类型 是WordPress自3.0版本以后新增的一个非常实用的特色功能。WordPress内置的两种文章类型:Post(文章)和 Page(页面),Post一般作为经常更新的文章使用(如博客日志)...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
095133
WordPress函数the_author_meta()-龙网 - 教程、网赚、安全、免费资源

WordPress函数the_author_meta()

介绍 the_author_meta() 显示用户资料的函数,如果该函数在 the_loop 中,那么将显示loop中的用户资料,如果在 the_loop 之外使用,必须指定用户ID才能输出内容。 使用 <?php the_author_met...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
035131
WordPress函数do_action()详解和应用举例-龙网 - 教程、网赚、安全、免费资源

WordPress函数do_action()详解和应用举例

do_action()函数: 我们经常能看到在一些WordPress函数中调用了do_action()函数,例如get_header(), get_footer()等调用模板的函数中经常调用do_action()函数。我们今天一起学习一下WordPress中...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
053131
WordPress函数wp_dropdown_users()-龙网 - 教程、网赚、安全、免费资源

WordPress函数wp_dropdown_users()

介绍 创建一个下拉选择输出所有作者。 使用 <?php wp_dropdown_users( $args ); ?> 默认使用 <?php $args = array( 'show_option_all' => null, // string 'show_option_none' =>...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
068128
WordPress函数get_archives_link()-龙网 - 教程、网赚、安全、免费资源

WordPress函数get_archives_link()

描述 根据预定义或自定义代码检索存档链接内容。 格式可以是四种样式之一。head 元素的“link”、select 元素中使用的“option”、列表中使用的“html”(ol 或 ul HTML 元素)。还支持使用 bef...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
057128
WordPress函数wp_get_archives()-龙网 - 教程、网赚、安全、免费资源

WordPress函数wp_get_archives()

WordPress的widget里提供的文章索引模板,他可以让你的WordPress博客的侧边栏按月度存档,方便读者,方便搜索引擎。但默认显示的是所有月度归档,这对有着两年,甚至两年以上历史的老博客来说,...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
060126
WordPress注册js函数wp_enqueue_script()-龙网 - 教程、网赚、安全、免费资源

WordPress注册js函数wp_enqueue_script()

wp_enqueue_script( string $handle, string $src = '', array $deps = array(), string|bool|null $ver = false, bool $in_footer = false ) wp_enqueue_script() 是WordPress注册和引用一个js...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
0100125
WordPress函数single_post_title()-龙网 - 教程、网赚、安全、免费资源

WordPress函数single_post_title()

介绍 显示single、page页面标题,这个标签不必在the_loop循环中,只要在single、page页面即可。 使用 <?php single_post_title(); ?> 参数 $prefix (string) (可选) 显示在标题前的文本。...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
036125
WordPress函数:comment_form() 让你的 WordPress 评论表单随心所愿-龙网 - 教程、网赚、安全、免费资源

WordPress函数:comment_form() 让你的 WordPress 评论表单随心所愿

wordpress默认评论表单的字段都只有4个,昵称、邮箱、网址、内容;评论是存在wp_comments表中的,根据自己的需要在制作自己的主题时,如何灵活的添加和删除自定义的字段呢?例如:tel电话字段,...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
036124
WordPress函数post_type_archive_title()-龙网 - 教程、网赚、安全、免费资源

WordPress函数post_type_archive_title()

介绍 post_type_archive_title() 是自定义文章类型 post type 的archive页面标题。显示 archive.php 和 archive-{posttype}.php 页面标题。 使用 <?php post_type_archive_title( $prefix,...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
062122
WordPress函数get_calendar()日历标签-龙网 - 教程、网赚、安全、免费资源

WordPress函数get_calendar()日历标签

介绍 get_calendar()是一个WordPress日历标签,可以在 WordPress主题 的任意模板中使用,并不需要在 the_loop 中。 默认会显示当前年月的一个日历,并且会在有日志的日期中带上日期的 date 链接...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
059120
WordPress分类列表函数:wp_list_categories用法及参数详解举例-龙网 - 教程、网赚、安全、免费资源

WordPress分类列表函数:wp_list_categories用法及参数详解举例

wp_list_categories 函数 是 WordPress 中用来罗列系统中分类链接的函数,将分类以列表的形式显示为链接。点击分类的链接,就可以访问该分类下的所有文章的存档页面。 注意: 1. wp_list_catego...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
051120
query_posts函数把你的WordPress博客变成CMS-龙网 - 教程、网赚、安全、免费资源

query_posts函数把你的WordPress博客变成CMS

query_posts函数的功能非常强大,只有想不到没有做不到,当你不满足wordpress博客主题的首页时,我们可以通过query_posts函数重新来打造我们的博客首页,可以把它变成一个显示容量强大的CMS主题...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
073119
WordPress函数the_author_posts()-龙网 - 教程、网赚、安全、免费资源

WordPress函数the_author_posts()

介绍 the_author_posts() 显示作者已发布的文章数量,必须使用在 the_loop 中。 使用 <?php the_author_posts(); ?> 示例 显示作者名称和已经发布的文章数量。 <p> <?php the_au...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
071115
WordPress函数:wp_tag_cloud(标签云)详解和举例-龙网 - 教程、网赚、安全、免费资源

WordPress函数:wp_tag_cloud(标签云)详解和举例

wp_tag_cloud() 函数的作用是用来标签云的,可以根据每个标签所关联的文章次数来定义字体大小、标签排序等属性。从 2.8 版本开始,添加了 分类法(taxonomy)参数,这就意味着,除了 标签(tags...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
057111
WordPress函数:add_theme_support()让你的主题支持特定的功能-龙网 - 教程、网赚、安全、免费资源

WordPress函数:add_theme_support()让你的主题支持特定的功能

add_theme_support() 用于在我们的当前使用的主题添加一些特殊的功能,函数一般写在主题的functions.php文件中,当然也可以再插件中使用钩子来调用该函数,如果是挂在钩子上,那他必须挂在after...
Seraph的头像-龙网 - 教程、网赚、安全、免费资源钻石会员Seraph7个月前
0104111