- This topic has 4 replies, 2 voices, and was last updated 8 years, 6 months ago by
stefan didak.
-
AuthorPosts
-
-
July 20, 2013 at 6:58 pm #930
stefan didakMemberTitle says it all. Something to consider for the wishlist; being able to associate an icon image with a CPT. This is currently supported for settings pages but it feels a little inconsistent that CPT registration doesn’t support it. And it would be a useful thing because the current way of getting that done is a bit… fiddly.
-
July 20, 2013 at 10:17 pm #931
SteveKeymasterThis is supported. Check out the Piklist Demo included with Piklist.
-
July 20, 2013 at 10:27 pm #932
stefan didakMemberGood to hear but what should I be looking at. I’m looking at the demo right now and seeing just the regular “thumbtack” imagine on the “Pilist Demo” CPT. I see the settings page has a custom image but not the CPT itself.
-
July 23, 2013 at 4:43 pm #935
SteveKeymasterThe correct code will be added in the next version.
Adding Menu and Page icons is pretty easy:
MENU ICON:
When you register a post type, include themenu_iconparameter with a path. Here’s the path to an image in Piklist.
'menu_icon' => plugins_url('piklist/parts/img/piklist-icon.png')PAGE ICON:
This is all CSS. To add it to the Piklist Demos, we would add this to our piklist-admin.css file:#icon-edit.icon32-posts-piklist_demo { background-image: url('../img/piklist-page-icon-32.png'); background-repeat: no-repeat; background-position: 0 0; }You need to target:
#icon-edit.icon32-posts-[your post type]. -
July 24, 2013 at 8:51 pm #936
stefan didakMemberAH! Thanks for that. I hadn’t noticed that part of it!
-
-
AuthorPosts
- You must be logged in to reply to this topic.