WordPress is a powerful and rich-featured CMS that allows you to create the custom post type in addition to the default types including Post, Page, Navigation Menu, Revision and Attachment. This feature allows you to have some new post types created and customized to fully meet your special requirements.
Previously, we have introduced WordPress custom post type in detail, including its definition, benefits and how to create it in this page. In the following, we’d like to present some customization ideas as how to add icon and RSS feeds for it.
Create Icon for WordPress Custom Post Type
Since WordPress version 3.8, there is a new feature added into the dashboard that is named as font icons or dashicons. These new icons look great and keep the admin menu visual appealing, applying differently for different post types automatically.
By default, the newly-created custom post types do not have the icons. Therefore, to keep your admin harmonious, you need to add the icons for these custom types.
To achieve this goal, you should firstly go to this WordPress Dashicons page. Here, you can find the developer resources of all the possible dashicons you may need, along with their corresponding Class Name, CSS, HTML and Glyph.
Now, you are falling into two situations. Firstly, if you create your custom post type by adding the code into your function.php file, you should add the menu_icon code into it. Note that the value of this code is the Class Name of the icon.
For audio icon
'menu_icon' => dashicons-format-audio',
Secondly, if you are using the WordPress plugin for the creation of custom post type, you should back to your plugin settings to figure out whether you can add the dashicons. Previously, we recommend you to use UI plugin for Custom Post Type. If you are using the same tool, then the adding of icons is easy.
In the basic settings of this plugin, you can find the Menu Icon option under the Settings area. Here, you only need to enter the Class Name of your target icon for your post type and click the Save Settings button.
If you use some other tools to create the post type, you now can install the CPT Custom Icon plugin. Then, you simply need to go to the CPT Custom Icon settings from the Settings tab. Here, you can find all your custom post types listed. Then, simply click the Choose Icon button and pick one among the options based on your needs.
Create RSS Feeds for WordPress Custom Post Type
If your website is falling into several categories, you may want to create separate RSS feeds for them, attracting different groups of readers effectively. Therefore, if your custom post type is within a separate category of the whole website, you can create an exclusive RSS feed for it, allowing the subscription from readers directly.
To achieve this, you do not need to do something technically. Instead, you can type the following line into your theme file. In this way, when readers open your custom posts, they can subscribe to the content easily.
Do not forget to replace the related values with your own domain name and post type name. Also, this method works out only when the custom post types are added into the main feed of your whole site, thus are publicly queryable. To ensure this, you’d better add the following coding into the functions.php file of your theme. Or, you can check this page for detailed coding information.