Copyright thumbnail

Add a Copyright Text / Info Using CSS on WordPress Websites

Don’t want to spend hours looking for footer.php or the right widget in WordPress just to add a copyright line to your website footer? Here’s a quick method using CSS.

Copyright line in a website footer

Add copyright text with CSS on a WordPress website

Paste this into Appearance → Customize → Additional CSS. Change the text, and replace .site-footer with your theme’s footer selector if it is different.

/* Replace .site-footer with your theme's footer selector if needed */
.site-footer::after {
    content: "© 2026 Your Site Name. All rights reserved.";
    display: block;
    clear: both;
    margin: 20px auto;
    font-size: 14px;
    color: #777;
    text-align: center;
}

To find your footer selector, right-click your footer, choose Inspect and look for the class or ID of the <footer> element. Many themes, including Astra and Storefront, use .site-footer. Block themes such as Twenty Twenty-Five use footer.wp-block-template-part instead:

footer.wp-block-template-part::after {
    content: "© 2026 Your Site Name. All rights reserved.";
    display: block;
    clear: both;
    margin: 20px auto;
    font-size: 14px;
    color: #777;
    text-align: center;
}

Why not footer > div:before? The original version of this post used that selector, but it adds the line to every div directly inside every footer on the page, so many themes show it two or three times (post footers count too). Targeting the one site footer shows it exactly once.

Keep in mind: text added with CSS can’t be selected or copied, search engines don’t treat it as page content, and the year won’t update by itself. If you need a real, auto-updating copyright line, use your theme’s footer settings instead (in Astra: Customize → Footer Builder → Copyright, which supports [current_year]).

Leave a Comment

Your email address will not be published. Required fields are marked *