• Thanks for this plug in. I have installed it and set the slug to ‘image-category’ in Media settings and it all works fine.

    However, now that my images have categories, I would like to update the category of images in PHP code but I am at a loss.

    I have tried every function I have found that seems even remotely related to this but have had no success. Can you give me a hint?

    Let’s say the image ID is ‘20000’ and the desired image-category ID is ‘100’ and its slug is ‘annual-exhibition’ … how can I set that category for that image?

    Thanks in advance for any help!

  • The topic ‘Setting an image’s category via PHP code’ is closed to new replies.