我正在使用 Elementor Pro 构建我的页面模板,并且我已使用 \xe2\x80\x93 下面的函数将标签标签更改为“主题”,这在除 Elementor Archive Title 小部件(由通过常规标题小部件,并将动态标签设置为“存档标题”)。
\n以下是我将标签更改为主题的功能:
\n // Change tags to topics\n\nfunction wd_hierarchical_tags_register() {\n\n // Maintain the built-in rewrite functionality of WordPress tags\n\n global $wp_rewrite;\n\n $rewrite = array(\n \'hierarchical\' => false, // Maintains tag permalink structure\n \'slug\' => get_option(\'tag_base\') ? get_option(\'tag_base\') : \'tag\',\n \'with_front\' => ! get_option(\'tag_base\') || $wp_rewrite->using_index_permalinks(),\n \'ep_mask\' => EP_TAGS,\n );\n\n// Redefine tag labels (or leave them the same)\n \n $labels = array(\n \'name\' => _x( \'Topics\', \'Taxonomy General Name\', \'hierarchical_tags\' ),\n …Run Code Online (Sandbox Code Playgroud)