acme.sh 用法

安装 acme.sh curl https://get.acme.sh | sh -s email=your-email@outlook.com 设置别名,方便使用: alias acme.sh=~/.acme.sh/acme.sh 申请证书: acme.sh --issue -d dev.wujie.me  --nginx ...

卸载xcode命令行工具

如果需要卸载xcode命令行工具,可以执行 sudo rm -rf /Library/Developer/CommandLineTools 接下来,运行以下命令来清理 xcode-select 的路径设置: sudo xcode-select --reset 如果你还希望彻底删...

MacBook安装Homebrew

执行下面的命令以安装homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 在安装homebrew之前,需要先安装xcode命令行工具,上面的安装脚本会...

WordPress在single页面获取自定发布类型的分类

在详情页面,即single页面获取自定义发布类型的分类 <?php /** 第一个参数表是当前文章的ID, 第二个参数表示所属的分类法,即taxonomy name。在single页面时可以直接使用 $post->ID **/ $terms = get_...

WordPress在archive.php页面获取当前分类信息

代码如下: echo get_queried_object()->term_id; 或者直接使用: $term_id = get_queried_object_id(); 获取分类的其它信息 $tax = $wp_query->get_queried_object(); echo $tax->name...

WordPress在archive.php页面获取文章列表

除了使用WP_Query函数之外,还可以使用query_posts函数来查询,如下: <?php query_posts(array( 'post_type' => 'case', // You can add a custom post type if you like 'paged' =>...