| 开发者 | codemetric |
|---|---|
| 更新时间 | 2026年11月23日 01:15 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
codemcti_get_category_icon( $term = null, $args = array() )
Returns the SVG markup of the icon assigned to a term, or an empty string. $term is a term object or ID and defaults to the queried term. $args accepts size (pixels, default 24), class and label (an empty label marks the icon as decorative).
codemcti_the_category_icon( $term = null, $args = array() )
Prints the icon. Takes the same arguments.
codemcti_get_category_icon_name( $term = null )
Returns the registered icon name, for example core/star-filled.
Filters
codemcti_taxonomies: filters the taxonomies that support icons.codemcti_available_icon_sets: filters the extra icon sets offered on the settings page.codemetric-taxonomy-icons folder to /wp-content/plugins/, or install the plugin from the Plugins screen.By default only Categories. You can turn on any other public taxonomy, including custom ones, on the settings page.
Yes. In the Categories with icons block, choose the taxonomy to show in the block settings panel. The list contains only the taxonomies registered for the current post type.
Yes. When Elementor is active, the Categories with icons and Categories list with icons widgets appear in the General category of the Elementor panel. They also work inside Elementor loop items.
The block shows nothing when the post has no terms in the chosen taxonomy, or when the chosen taxonomy is not registered for the post type.
It relies on the WordPress Icons registry to store and render icons.