/** * 电巢子主题 V2.0 — Taxonomy 扩展(基于 OneNav 父主题) * * 父主题 OneNav 已注册 4 个 CPT:sites / app / book / bulletin * 子主题不重复注册 CPT,只在父主题的 CPT 上扩展额外 Taxonomy: * - site_cat (网址分类,挂在父主题的 sites) * - site_tag (网址标签,挂在父主题的 sites) * - site_country (网址国家/地区,挂在父主题的 sites / app / book) * * @package DianChao */ if (!defined('ABSPATH')) exit; /* ============================ * 1. 网址分类(site_cat) * 挂在父主题 'sites' CPT 上 * ============================ */ add_action('init', function () { if (taxonomy_exists('site_cat')) return; register_taxonomy('site_cat', ['sites'], [ 'labels' => [ 'name' => '网址分类', 'singular_name' => '网址分类', 'search_items' => '搜索分类', 'all_items' => '所有分类', 'parent_item' => '父级分类', 'edit_item' => '编辑分类', 'update_item' => '更新分类', 'add_new_item' => '添加新分类', 'menu_name' => '网址分类', ], 'public' => true, 'show_in_rest' => true, 'hierarchical' => true, 'rewrite' => ['slug' => 'site-cat'], ]); }); /* ============================ * 2. 网址标签(site_tag) * 挂在父主题 'sites' CPT 上 * ============================ */ add_action('init', function () { if (taxonomy_exists('site_tag')) return; register_taxonomy('site_tag', ['sites'], [ 'labels' => [ 'name' => '网址标签', 'singular_name' => '网址标签', 'search_items' => '搜索标签', 'menu_name' => '网址标签', ], 'public' => true, 'show_in_rest' => true, 'hierarchical' => false, 'rewrite' => ['slug' => 'site-tag'], ]); }); /* ============================ * 3. 国家/地区(site_country) * 挂在父主题 'sites' / 'app' / 'book' CPT 上 * ============================ */ add_action('init', function () { if (taxonomy_exists('site_country')) return; register_taxonomy('site_country', ['sites', 'app', 'book'], [ 'labels' => [ 'name' => '国家/地区', 'singular_name' => '国家/地区', 'search_items' => '搜索国家', 'all_items' => '所有国家', 'edit_item' => '编辑国家', 'update_item' => '更新国家', 'add_new_item' => '添加新国家', 'menu_name' => '国家/地区', ], 'public' => true, 'show_in_rest' => true, 'hierarchical' => true, 'rewrite' => ['slug' => 'site-country'], ]); });
天天特卖是淘宝的一个特价专区,这里汇聚了最实惠的 201
是为了让流量更加精准,当流量精准了,直通车的点击 201
直通车推广工具是不少卖家都会使用的一种,但是在进 201
为了找到相似的产品,通过图片搜索的场景是很常见的 200
开车当心的问题解析关于说到电商行业的都知道,推广 200
直通车的玩法有很多,但是大家也需要明白,直通车推 200
直通车可以说是人尽皆知了,它是的一把利器,虽说推 200
商家在使用直通车进行推广时,也要注意人群的筛选。 200
我们知道,平台有个人店个体工商户店还有企业店这些 199
随着移动互联网的迅猛发展,电商平台成为人们购物的 199