The Icon Block

The Icon Block

توسط

The Icon Block plugin registers a single, easy-to-use block that allows you to add custom SVG icons and graphics to the WordPress block editor (Gutenberg).

The plugin also includes the complete WordPress icon library with 290+ SVG icons.

Key features

  • 290+ native WordPress icons, including social logos
  • Use any custom SVG icon or graphic
  • Insert icons from your Media Library if SVG uploads are supported
  • Includes handy icon controls (link, rotate, alignment, colors, border, padding, margin, etc.)
  • Fully compatible with the Site Editor
  • No block library required 🎉
  • Built almost entirely with native WordPress components
  • Will get additional functionality as it’s added to WordPress core
  • Register your own custom icon library. Learn more

Stay connected

  1. You have a couple of options:
    • Go to Plugins → Add New and search for “Icon Block”. Once found, click “Install”.
    • Download the Icon Block from WordPress.org and make sure the folder is zipped. Then upload via Plugins → Add New → Upload.
    • Open the block inserter within the Block Editor (Gutenberg) and search for “icon”. The plugin should appear and allow you to install it directly. Skip steps 2 and 3.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Search for the block within the Block Editor (Gutenberg) and begin using it.

سوالات متداول

Where can I get more icons?

Currently, the Icon Block only includes the WordPress icon library. That said, the plugin allows you to render any SVG-based icon by simply copying/pasting the code into the icon text area when using the “Add custom icon” option! See the screenshots for reference. This gives you complete flexibility and allows you to use practically any icon you want. A great source for free SVG icons is Google’s Material Icons project, Font Awesome, and Iconic, to name a few.

The Icon Block also allows you to register your own custom block library. This needs to be done externally in your theme or via a plugin but provides complete flexibility over the icons available in the plugin. Learn more.

Why is my icon not changing color?

The Icon Block includes controls for the icon’s color and background. However, if your SVG icon has hard-coded color/fill values, the plugin will respect those instead of any applied custom colors.

Why can’t I add SVG icons from my Media Library?

By default, WordPress does not allow you to add SVG files to your Media Library, but you can enable this functionality using plugins like Safe SVG. If SVG uploads are enabled, you will see the option to insert icons from Media Library in the Icon Block.

Why is the block not working for certain users?

WordPress only allows Administrators and Editors to save “Unfiltered HTML” content, which includes SVGs. The Icon Block will not work properly for users who are at the Author level or lower.

Note that WordPress multisite installations have additional restrictions. “Unfiltered HTML” is restricted to Super Admins on multisite. To enable “Unfiltered HTML” content for site Administrators and Editors, you will need to use a code snippet, the Unfiltered MU plugin, or something similar. Regrettably, this is a WordPress restriction and needs to be handled outside of the Icon Block.

×
نظری برای این آیتم موجود نیست.
0 0 رای ها
امتیازدهی
اشتراک در
اطلاع از
0 نظرات
قدیمی‌ترین
تازه‌ترین بیشترین رأی
بازخورد (Feedback) های اینلاین
مشاهده همه دیدگاه ها
هیچ نسخه‌ای برای این آیتم موجود نیست.
★★★★★
★★★★★
5.0 /5 (29 نظر)

قیمت:

رایگان

نگارش

آخرین انتشار

10 اردیبهشت 1405

آخرین بروزرسانی

2 ماه پیش

نصب های فعال

30,000+

نگارش وردپرس

وردپرس 6.5+

تست شده از نسخه

وردپرس 6.9.4

نگارش PHP

PHP 7.4+

نسخه ها

0 نسخه