WordPress Code: How to Add Copyright Attribution To Images Based on Context


👇 Currently Trending Themes

It is no secret that if you are using someone else’s photo on your site, you should include copyright attribution when required. In fact, it is a good practice to do even when you are not. For your own photos, you will also want to include a copyright notice to make sure others respects your rights. Plugins like this can help:

This code snippet uses post author and upload year when images are uploaded through a post. If you upload an image to your Media Library, site name and upload your are used. Just add this code to your functions.php file to get started.

More WordPress reading: