4

I'm finding plugins that add the option for featured images for categories, but not how to code it yourself.

4

I had missed that you can easily add fields to taxonomy terms with Advanced Custom Fields: https://www.advancedcustomfields.com/resources/get-values-from-a-taxonomy-term/

0

There are already some solutions out there for adding custom fields to taxonomy. See: Add custom field to Category

You will see a 2016 update near the bottom that should help you.

With this you can simply copy an image url once you have uploaded it to your Media Library but I am assuming you want an Upload Media Modal (popup window) utilizing wp.media right? You will have to do that with javascript. This post explains several methods in which to instantiate a media uploader modal: https://mikejolley.com/2012/12/21/using-the-new-wordpress-3-5-media-uploader-in-plugins/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.