I'm building my first wordpress theme and was wishing that after the consumer designed a new category, there is a means of instantly producing a thumbnail for this in the first image submitted like a publish for this category (it's a portfolio theme).
Does anybody understand how this can be coded?
It can't depend on hard coding because the user doesn't understand how to do that and that i canrrrt do it for each category they create.
Any pointers for code as well as plug-inches could be grerat.
It does not auto-create a symbol in line with the first publish, but this can be a "category icon" wordpress plugin which may enable your customers to specify a symbol for every category via a page within the user interface. It is not fully automated for the reason that customers can't upload images directly through its admin page, however they could upload towards the media library after which reference the URL.
Observe that around the Wordpress wordpress plugin page this wordpress plugin shows up as compatible as much as 2.6.1 but when you search the compatibility list for just two.7 it's on the website as working, and even I've it focusing on my 2.7.1 site.
Compatibility list: http://codex.wordpress.org/Plugins/Plugin_Compatibility/2.7
Hope this can help! M
It appears like this plugin or similar might do what you're searching for.
Hook onto an appropriate action for example
publish_post to ensure that, whenever a new publish is produced and sent to the planet, you scour the HTML for image tags. When the post's category doesn't curently have a thumbnail connected, make use of an image out of this publish to produce a thumbnail and connect it using the category. Should you only want this to happen for brand new groups and never existing groups, track which groups were already present once the wordpress plugin was installed.
You could utilize WordPress' existing media infrastructure to keep the thumbnail and also the
wp_postmeta table to trace your category-thumbnail associations. PHP has a library for image manipulation, and HTML hunting could be completed with string manipulation.