Hi Vayu,
I will consider this feature for a future upgrade. Because I don’t want to make configuring the widget more complex I could add a class based on the title of the custom post type in the widget, would that help?
Hi Johan.
Thanks for taking this into consideration. 🙂
I understand. I guess that could be an option, however, not so good if the client should chose to change the title, which is more likely to happen than if there was a class/id input field.
Cordially
Vayu
Hello to both of you.
I was searching for this exact topic: how to add a custom class, and/or add a unique id, so I can target a re-used custom post block on multiple pages and style them identically, AND have the confidence that when I’m done working on developing on my server, and pass this off to a client, that the ID will remain the same. (will it? have you ever tried that?)
Adding a class that matches the title would definitely help!!!
I could also wrap my content in my own html, but that is adding extra mark-up that I’d like to stay away from.
Hey Vayu,
I did a further search to just try to filter the custom-post-widget classes, and found this plugin.
Installed it, it totally works.
http://ww.wp.xz.cn/extend/plugins/kc-widget-enhancements/
Hi Wlanni, thanks for sharing your solution!
I recently modified this widget to allow for a custom class within the shortcode.
You can see it here: http://pastebin.com/2MeuBwLT
I hope this helps and I would like to see this implemented in a future release.
Thanks for sharing your code, I have included it in the plugin!