Warning: Undefined array key 0 in /www/wwwroot/www.dianjin123.com/wp-content/themes/dianjinwp/functions.php on line 169 WordPress设置文章标签函数:wp_set_post_tags 发布于2022/07/13 WordPress函数wp_set_post_tags用于给文章分配标签。 wp_set_post_tags( int $post_id, s··· 查看详情
Warning: Undefined array key 0 in /www/wwwroot/www.dianjin123.com/wp-content/themes/dianjinwp/functions.php on line 169 WordPress添加元数据设置项函数:add_meta_box 发布于2022/07/13 WordPress函数add_meta_box用于为指定文章类型添加元数据设置项,例如可以为文章添加一个··· 查看详情
Warning: Undefined array key 0 in /www/wwwroot/www.dianjin123.com/wp-content/themes/dianjinwp/functions.php on line 169 WordPress生成摘要函数:wp_trim_excerpt 发布于2022/07/13 WordPress函数wp_trim_excerpt生成长度为55字符的文章摘要。 wp_trim_excerpt( string $t··· 查看详情
Warning: Undefined array key 0 in /www/wwwroot/www.dianjin123.com/wp-content/themes/dianjinwp/functions.php on line 169 WordPress获取文章内容函数:get_the_content 发布于2022/07/13 WordPress函数get_the_content用于获取文章内容,通常用在主循环The Loop中。 get_the_co··· 查看详情
Warning: Undefined array key 0 in /www/wwwroot/www.dianjin123.com/wp-content/themes/dianjinwp/functions.php on line 169 WordPress获取当前Post ID函数:get_the_ID 发布于2022/07/13 WordPress函数get_the_ID一般用在主循环The Loop中,以获取当前Post ID。也可以在文章模··· 查看详情
Warning: Undefined array key 0 in /www/wwwroot/www.dianjin123.com/wp-content/themes/dianjinwp/functions.php on line 169 WordPress获取作者函数:get_the_author 发布于2022/07/13 WordPress函数get_the_author用于获取作者的名称,返回名称为个人资料中“公开显示为”选项··· 查看详情
Warning: Undefined array key 0 in /www/wwwroot/www.dianjin123.com/wp-content/themes/dianjinwp/functions.php on line 169 WordPress判断是否为分类函数:is_category 发布于2022/07/13 WordPress函数is_category用于判断当前页面是否为分类页面,如果指定了$category参数,该··· 查看详情
Warning: Undefined array key 0 in /www/wwwroot/www.dianjin123.com/wp-content/themes/dianjinwp/functions.php on line 169 WordPress判断文章是否属于某分类标签:in_category 发布于2022/07/13 WordPress模板标签in_category用于判断文章是否属于某分类,该函数只能在The Loop主循环··· 查看详情
Warning: Undefined array key 0 in /www/wwwroot/www.dianjin123.com/wp-content/themes/dianjinwp/functions.php on line 169 WordPress获取父分类标签:get_category_parents 发布于2022/07/13 WordPress模板标签get_category_parents用于获取父分类,在制作面包屑导航时非常有用。 g··· 查看详情
Warning: Undefined array key 0 in /www/wwwroot/www.dianjin123.com/wp-content/themes/dianjinwp/functions.php on line 169 WordPress判断当前分类是否为某分类的子分类函数:cat_is_ancestor_of 发布于2022/07/13 WordPress函数cat_is_ancestor_of判断一个分类是否为另一个分类的父分类或根分类,反过来··· 查看详情
Warning: Undefined array key 0 in /www/wwwroot/www.dianjin123.com/wp-content/themes/dianjinwp/functions.php on line 169 WordPress获取所有分类ID函数:get_all_category_ids 发布于2022/07/13 WordPress函数get_all_category_ids以数组的形式返回所有分类的ID,在个性定制主题时非常··· 查看详情
Warning: Undefined array key 0 in /www/wwwroot/www.dianjin123.com/wp-content/themes/dianjinwp/functions.php on line 169 WordPress获取分类信息函数:get_categories 发布于2022/07/13 WordPress函数get_categories用于获取分类的信息 get_categories( string|array $args = ··· 查看详情