Custom post types help you manage your content in WordPress. But, they often need icons to look better. Adding icons can make your site more user-friendly. Let’s learn how to add icons for custom post types in WordPress.
Why Add Icons for Custom Post Types?
Icons make your site look clean and professional. They help users find what they need quickly. Icons also make navigation easier. Adding icons is simple and worth the effort.
Steps to Add Icons for Custom Post Types
Follow these steps to add icons:
Step 1: Install A Plugin
First, you need to install a plugin. A plugin helps you add icons easily. The plugin we recommend is “Dashicons.” This plugin is free and easy to use.
To install the plugin:
- Go to your WordPress dashboard.
- Click on “Plugins” in the menu.
- Click “Add New” at the top of the page.
- Search for “Dashicons” in the search bar.
- Click “Install Now” next to the plugin name.
- After installing, click “Activate.”
Step 2: Choose An Icon
After installing the plugin, choose an icon. Dashicons provides many icons. To see the icons:
- Go to the Dashicons website.
- Browse through the icons.
- Find the icon that fits your custom post type.
- Note down the icon class. The class looks like this:
dashicons-admin-post
.
Step 3: Add Icon Code
Now, add the icon code to your custom post type. You need to edit your theme’s functions.php
file. Be careful when editing this file. Any mistakes can break your site.
To add the icon code:
- Go to your WordPress dashboard.
- Click on “Appearance” in the menu.
- Click “Theme Editor.”
- Find and open the
functions.php
file. - Locate the code that registers your custom post type. It should look like this:
function create_custom_post_type() {
register_post_type('custom_post',
array(
'labels' => array(
'name' => __('Custom Posts'),
'singular_name' => __('Custom Post')
),
'public' => true,
'has_archive' => true,
'menu_icon' => 'dashicons-admin-post',
)
);
}
add_action('init', 'create_custom_post_type');
Replace dashicons-admin-post
with the icon class you noted earlier.
Step 4: Save And Check
After adding the icon code, save the changes. To do this:
- Click the “Update File” button at the bottom of the page.
- Go to your WordPress dashboard.
- Check if the icon appears next to your custom post type.
If the icon appears, you have done it right. If not, check the code again.
Using Other Plugins
You can use other plugins to add icons. Some popular plugins are:
- Font Awesome
- Menu Icons
These plugins offer many icons. They are easy to use and can improve your site.

Credit: www.wpbeginner.com
Font Awesome
Font Awesome offers many icons. To use Font Awesome:
- Go to your WordPress dashboard.
- Click on “Plugins” in the menu.
- Click “Add New” at the top of the page.
- Search for “Font Awesome” in the search bar.
- Click “Install Now” next to the plugin name.
- After installing, click “Activate.”
Once activated, you can use Font Awesome icons. To add an icon:
- Go to the Font Awesome website.
- Find the icon you want.
- Note down the icon class. The class looks like this:
fa fa-rocket
. - Add the class to your
functions.php
file, like this:
function create_custom_post_type() {
register_post_type('custom_post',
array(
'labels' => array(
'name' => __('Custom Posts'),
'singular_name' => __('Custom Post')
),
'public' => true,
'has_archive' => true,
'menu_icon' => 'fa fa-rocket',
)
);
}
add_action('init', 'create_custom_post_type');
Menu Icons
Menu Icons is another great plugin. To use Menu Icons:
- Go to your WordPress dashboard.
- Click on “Plugins” in the menu.
- Click “Add New” at the top of the page.
- Search for “Menu Icons” in the search bar.
- Click “Install Now” next to the plugin name.
- After installing, click “Activate.”
Once activated, you can use Menu Icons. To add an icon:
- Go to “Appearance” in the menu.
- Click “Menus.”
- Find your custom post type in the menu.
- Click on the drop-down arrow to expand it.
- Click “Menu Icon” and choose an icon.
- Save your changes.

Credit: www.advancedcustomfields.com
Frequently Asked Questions
How To Add Icons To Custom Post Types?
Use the `register_post_type` function and add the `menu_icon` parameter.
Where To Find Icon Options For Custom Post Types?
Check the WordPress Dashicons library for a variety of free icons.
Can I Use Custom Images As Icons?
Yes, you can upload custom image URLs in the `menu_icon` parameter.
Do I Need A Plugin For Custom Post Type Icons?
No, you can add icons directly in your theme’s `functions. php` file.
Conclusion
Adding icons for custom post types in WordPress is simple. Use plugins like Dashicons, Font Awesome, or Menu Icons. Follow the steps provided in this guide. Your site will look better and be easier to navigate. Happy customizing!