<?php the_widget('cat_tag_filter',$ instance,$ args); ?>
?>
code> pre>
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’ p>
If you want to override some settings, for example get rid of title and turn on the counter for tag list use this code:
如果要覆盖某些设置,例如摆脱标题并打开标签列表计数器,请使用以下代码: p>
<?php the_widget('cat_tag_filter','title =&tags_count = 1'); ?>
?>
code> pre>
If you want to get rid of div’s that WordPress creates before and after all the widgets, use this code:
如果您想摆脱WordPress在所有小部件之前和之后创建的div,请使用以下代码: p>
<?php the_widget('cat_tag_filter','title =','before_widget =&after_widget ='); ?>
?>
code> pre>
You can also override before_title
and after_title
the same way.
您还可以以相同的方式覆盖 before_title code>和 after_title code>。 p>