Change Output of Blog Copyright Plugin For WordPress

Some WordPress themes don’t seem to output to a copyright div, so users need a plugin to do so. Blog Copyright by Blog Traffic Exchange does the trick, but it’s not without its shortcomings.

The main problem is that Blog Copyright outputs the blog link into the copyright…which is spammy, because the blog title in the footer already contains a link to the blog.

Here’s how the footer output looks, after some CSS style changes:

The simplest fix would be not to put anything into the Blog Title text box in the dashboard settings, but then Blog Copyright would still create an anchor tag. I doubt the search engines approve of anchor tags with empty href attributes…

The other approach is to go into the PHP code, and change the plugin’s output. The line in question is near the bottom of the BTE_BC_core.php file, at line 155:

return stripslashes($bte_bc_header).'© '.stripslashes($years).' <a href="'.stripslashes($bte_bc_url).'">'.stripslashes($bte_bc_org_header.$bte_bc_org.$bte_bc_org_footer).'</a> '.stripslashes($bte_bc_rights.$link.$bte_bc_footer);

After removing the href attribute, line 155 looks like this:

return stripslashes($bte_bc_header).'© '.stripslashes($years).
stripslashes($bte_bc_rights.$link.$bte_bc_footer);

Once the file is saved & uploaded to the server, the anchor tag will no longer be part of the copyright output:


The code in Step 5 is word-wrapped. If copying & pasting, do NOT add returns to this code!

This entry was posted in Copyright Year Code, WordPress, WordPress - Installation. Bookmark the permalink.