[wordpress插件] Cat + Tag Filter猫+标签过滤器

wordpress 插件 文章 2020-03-17 19:00 779 0 全屏看文

AI助手支持GPT4.0

评分
90
描述

If you were searching for an easy way to let your WordPress site visitors to filter your content by a category and several tags in the same time, this plugin will help you a lot.

如果您正在寻找一种让WordPress网站访问者同时按类别和多个标签过滤内容的简便方法,则此插件将为您提供很大帮助。

It will add a widget to your widgets admin page, where you can edit the settings and put it in any “widgetized” place on your website.

它将在您的窗口小部件管理页面中添加一个窗口小部件,您可以在其中编辑设置并将其放置在网站上的任何“小部件”位置。

This plugin will be very useful for websites with hundreds of categories and tags.

此插件对于具有数百个类别和标签的网站非常有用。

I wrote it for my travel blog where we have categories for places that we’d been and tags for topics like video, photo, useful, mountains, beaches e.t.c.

我是在旅行博客上写的,其中有我们去过的地方的类别,以及视频,照片,实用,山脉,海滩等主题的标签,例如

So I wanted to give my visitors an ability to easily filter content by any category plus tag, like category India + tag Video + tag Mountains.

因此,我想让访问者能够轻松地按任意类别加标签过滤内容,例如类别印度+标签视频+标签山

WordPress has the ability to show such pages, we just need to pass the proper address to it.

WordPress可以显示此类页面,我们只需要向其传递正确的地址即可。

If your WordPress template doesn’t support widgets, please see the Installation tab, there are some instructions on how to manually add this widget in your template files.

如果您的WordPress模板不支持小部件,请参见安装标签,其中有一些说明,说明如何在模板文件中手动添加此小部件。

安装步骤

    1. Go to your WordPress admin dashboard -> Plugins -> Add new, then search for Cat + Tag Fliter and agree to install it.
    2. 转到WordPress管理控制台->插件->添加新内容,然后搜索 Cat + Tag Fliter ,并同意安装它。

    3. Go to youк widget options and change the widgets settings.
    4. 转到youк小部件选项并更改小部件设置。

    5. Sometimes it is needed to manually flush rewrite rules.

    6. 有时需要手动刷新重写规则。

      Go to your Permalinks Options and change it to something else, save, and then change it back to normal.

    7. 转到“永久链接选项”,将其更改为其他内容,保存,然后将其恢复为正常。

    If it didn’t work, try this:

    如果它不起作用,请尝试以下操作:

      1. Upload cat-tag-filter folder to the /wp-content/plugins/ directory
      2. cat-tag-filter 文件夹上载到 / wp-content / plugins / 目录

      3. Activate the plugin through the ‘Plugins’ menu in WordPress
      4. 通过WordPress中的“插件”菜单激活插件

      5. Go to your widgets settings and add Cat + Tag Filter widget to your sidebar.
      6. 转到您的窗口小部件设置,然后将Cat +标记过滤器窗口小部件添加到侧边栏。

      If your theme doesn’t support widgets, you can use this code:

      如果您的主题不支持小部件,则可以使用以下代码:

        <?php the_widget('cat_tag_filter',$ instance,$ args); 

      ?>

      ?>

      Here is a full list of default $instance arguments:
          

      这里是默认$ instance参数的完整列表:
          

      ‘title’ => ‘Filter’
          

      ‘title’=>‘Filter’
          

      ‘button_title’ => ‘Show posts’
          

      ‘button_title’=>‘显示帖子’
          

      ‘cat_list_label’ => ‘Show posts from:’
          

      ‘cat_list_label’=>‘显示来自的帖子:’
          

      ‘tag_list_label’ => ‘With tag:’
          

      ‘tag_list_label’=>‘带有标签:’
          

      ‘all_cats_text’ => ‘Any category’
          

      ‘all_cats_text’=>‘任何类别’
          

      ‘all_tags_text’ => ‘Any tag’
          

      ‘all_tags_text’=>‘任何标签’
          

      ‘cats_count’ => 1
          

      ‘cats_count’=> 1
          

      ‘tags_count’ => 0
          

      ‘tags_count’=> 0
          

      ‘tag_logic’ => 1 // 1 for AND and 0 for OR logic operator
          

      ‘tag_logic’=> 1 // 1代表AND,0代表OR逻辑运算符
          

      ‘tag_type’ => 1 // 1 for checkboxes and 0 for dropdown
          

      ‘tag_type’=> 1 // 1表示复选框,0表示下拉菜单
          

      ‘clude_tags’ => ‘exclude’ //can be ‘include’ or ‘exclude’
          

      ‘clude_tags’=>‘排除’//可以是'include'或'exclude'
          

      ‘exclude_tags’ => ” //used for including tags also, if clude_tags is set to ‘include’
          

      ‘exclude_tags’=>” //也用于包含标签,如果clude_tags设置为‘include’
          

      ‘clude_cats’ => ‘exclude’ //can be ‘include’ or ‘exclude’
          

      ‘clude_cats’=>‘排除’//可以是'include'或'exclude'
          

      ‘exclude_cats’ => ” //used for including categories also, if clude_cats is set to ‘include’
          

      ‘exclude_cats’=>” //也用于包括类别,如果clude_cats设置为‘include’
          

      ‘tag_tax’ => ‘post_tag’,
          

      ‘tag_tax’=>‘post_tag’,
          

      ‘category_tax’ => ‘category’

      ‘category_tax’=>‘category’

      If you want to override some settings, for example get rid of title and turn on the counter for tag list use this code:

      如果要覆盖某些设置,例如摆脱标题并打开标签列表计数器,请使用以下代码:

        <?php the_widget('cat_tag_filter','title =&tags_count = 1'); 

      ?>

      ?>

      If you want to get rid of div’s that WordPress creates before and after all the widgets, use this code:

      如果您想摆脱WordPress在所有小部件之前和之后创建的div,请使用以下代码:

        <?php the_widget('cat_tag_filter','title =','before_widget =&after_widget ='); 

      ?>

      ?>

      You can also override before_title and after_title the same way.

      您还可以以相同的方式覆盖 before_title after_title

下载地址
https://downloads.wordpress.org/plugin/cat-tag-filter-widget.0.9.1.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Da Stop Words Removal停止单词删除
[wordpress插件] Domainer领域者
[wordpress插件] Admin Author Filter管理员作者过滤器
[wordpress插件] Autism Speaks Ribbon自闭症说丝带
[wordpress插件] Conductrics Web Actions行为者网络行为
随便看看
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9568
问题? 9048
如何快速搭建抽奖助手小程序(无需代码知识) 6177
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 7472
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 6793
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 6128
如何解决渲染层网络错误Failed to load media? 17394
小程序找号找回 释放昵称? 3253
我的小程序广告主收入5301,实际进账4406,是怎么回事呀? 3110
删除部分微信用户个人数据的通知,怎么删除? 6381