Category / Dev Note

  • mac用docker挂载阿里云盘

    Docker下创建webdavdocker run -d --name=aliyundrive-webdav --restart=unless-stopped -p 8080:8080 \ -v /etc/aliyundrive-webdav/:/etc/aliyundrive-webdav/ \ -e REFRESH_TOKEN='refresh token' \ -e WEB...

  • wp_insert_post 插入文章或页面详解

    ‘ID’(int) 文章ID,如果不等于0则更新,等于0则创建,默认为0。‘post_author’(int) 添加文章的作者,默认为当前用户。‘post_date’(string) 文章添加日期,默认为当前日期‘post_date_gmt’(string) 在格林尼治时间区域中的时间,默认为 $post_date的值.‘post_content’(mixed) 文章内容,默认为空.‘pos...

  • wp_insert_post 自定义文章类型的目录问题

    The post_category you are using is for core categories taxonomy. For custom taxonomies you have to use tax_input. For example, the next code set terms for custom_tax_category and custom_ta_tag taxo...

  • WordPress写入文章过滤HTML标签

    方法一打开 wp-includes 目录的 kses.php,搜索:add_action('init', 'kses_init'); add_action('set_current_user', 'kses_init'); 注释掉以上代码即可。方法二在主题 functions.php 模板中加入:remove_action('init', 'kses_init'); remove_actio...

  • wordpress根据分类别名获取分类ID

    在制作wordpress模板的时候可能会有使用分类别名获取分类ID的情况,比如有些函数不接受分类别名只能通过ID读取。get_category_by_slug('分类别名'); 通过上面的函数可以通过分类名称获得整个分类的数组信息。我们将获得的组数信息打印出来。WP_Term Object ( [term_id] => 15 [name] => 专家 [slug] =&g...

Show more
To the end No more pages to load
Imagineer