How do I create an automated copyright line in WordPress?
June 9, 2016 6:38 AM   Subscribe

I'm still a novice at WordPress, and I know next to nothing about PHP, so forgive me if I use the wrong terminology for anything. How do I make a function that displays an author's name and the year to automatically generate a copyright line?

I'm working on a site with content produced by multiple authors. Each author's name is stored as a WordPress category (there's probably a better way to have done this, but it can't be changed now). I'm trying to create a function that will automatically produce the following text string, so that I can insert it into the footer of every post:


Thank you!
posted by Faint of Butt to Computers & Internet (4 answers total) 1 user marked this as a favorite
Under the Berne convention you don't need to do this. Copyright is automatic unless explicitly waived. There doesn't need to be a copyright notification.
posted by Chocolate Pickle at 6:48 AM on June 9, 2016 [2 favorites]

In the loop, use the code
Copyright © <?php the_date('Y'); ?> <?php echo get_the_author(); ?>

Or if you're really stuck with the category ..

In the loop, use the code
Copyright © <?php the_date('Y'); ?> <?php the_category(', '); ?>

Function reference from Codex -

StackOverflow about the_category -

Some tips for multiauthor blogs -
posted by kellygrape at 6:59 AM on June 9, 2016 [3 favorites]

Don't put a copyright for each post (e.g. in the loop), put it in the footer.php of your theme.
posted by furtive at 1:26 PM on June 9, 2016

That did the trick! Thank you, kellygrape!
posted by Faint of Butt at 5:02 PM on June 9, 2016

« Older Awesome gift for 11yo niece in Japan   |   Where do I take my indecisive mom and her dog on... Newer »
This thread is closed to new comments.