WordPress.org

Forums

ComicPress
Edit Copyright with Child Theme for Comicpress (16 posts)

  1. rowrowboat
    Member
    Posted 1 year ago #

    Hello,

    I've been spending all of last night and this morning looking up forums and tutorials, and tinkering with the code, and I still can't seem to figure this out.

    I want to add my name to the copyright info in the footer of my website. I'm using comicpress, but I created a child theme so that I could make edits without actually changing the comicpress theme itself.

    My site is wingspancomic.com.

    What code would go into a new .php document that will keep all of the "Powered by WordPress" information and add my name to the copyright? Do I edit it in the footer.php or the copyright.php?

    I have a working understanding of html and CSS but I don't understand this php language at all.

    Thanks in advance for the help!

  2. woodson1975
    Member
    Posted 1 year ago #

    Not sure you are allowed to do this:

    11. "Attribution. Automattic reserves the right to display attribution links such as ‘Blog at WordPress.com,’ theme author, and font attribution in your blog footer or toolbar. Footer credits and the WordPress.com toolbar may not be altered or removed regardless of upgrades purchased."

  3. esmi
    Forum Moderator
    Posted 1 year ago #

    The above quote refers to wordpress.com blogs - not self hosted WordPress sites.

  4. rowrowboat
    Member
    Posted 1 year ago #

    Yeah, I've seen a bunch of comic sites that have Copyright (year) (author's name) followed by, Powered by WordPress with Comicpress, etc.

    It should be really easy to do, right?

  5. woodson1975
    Member
    Posted 1 year ago #

    Should be easy enough. You should make a child theme (so any updates to the theme don't overwrite your changes). Copy the footer.php file into your new child theme folder and then edit from there.

  6. woodson1975
    Member
    Posted 1 year ago #

    ...or, if your theme has a copyright.php file, do the above steps with that file

  7. rowrowboat
    Member
    Posted 1 year ago #

    I understand that. I've made the child theme and copied both of the php files...but I don't understand where to add my name. Any time I edit the code, the footer either disappears completely or remains unchanged.

    Should I just copy/paste the php into this forum and get tips from there?

  8. stephencottontail
    Member
    Posted 1 year ago #

    Copy your footer.php to someplace like Pastebin and post the link instead. Posting huge blocks of code into a post is frowned upon here.

  9. woodson1975
    Member
    Posted 1 year ago #

    Sorry, I've not used Pastebin before so I hope this works. I did a test on a footer theme of mine. Basically, you comment out the existing footer markup and put your new stuff in above.

    Pastebin

  10. stephencottontail
    Member
    Posted 1 year ago #

    I thought you were using ComicPress. Why does your posted code have twentythirteen as your text domain? Also, can you post the entire file, rather than just the part that's giving you trouble?

  11. rowrowboat
    Member
    Posted 1 year ago #

    Oh that wasn't me; woodson1975 was just testing it for me?

    http://pastebin.com/xXJGGRNP
    Here is the content for the footer.php

    http://pastebin.com/xCN4mjuJ
    And here is the content for the copyright.php

    Where do I add the code? And, what code do I even add? I just want it to be the copyright symbol, the year, and my name (which links to my portfolio site).

    Thanks for your help.

  12. stephencottontail
    Member
    Posted 1 year ago #

    Sorry, my mistake. In your child theme's functions.php, try something like this:

    <?php
    
    function comicpress_copyright_text() {
    	$output = "<p class=\"copyright-info\">\r\n";
    	$output .= "<span>© 2014 - <a href=\"http://rowrowboatsportfoliosite.com/\">rowrowboat</a>";
    	$output .= "</span>\r\n";
    	if (!comicpress_themeinfo('disable_scroll_to_top')) {
    		$output .= "<span class=\"footer-uptotop\">";
    		$output .= "<span class=\"footer-pipe\">|</span> ";
    		$output .= "<a href=\"#outside\" onclick=\"scrollup(); return false;\">".__('Back to Top ↑','comicpress')."</a>";
    		$output .="</span>\r\n";
    	}
    	$output .= "</p>\r\n";
    	echo apply_filters('comicpress_copyright_text', $output);
    }
    ?>

    You'd replace "http://rowrowboatsportfoliosite.com/" with the URL to your portfolio site and the rowrowboat immediately afterwards with your own name.

  13. stephencottontail
    Member
    Posted 1 year ago #

    Actually, strike that last one. I just saw that you wanted to keep all of the other information. Try this instead:

    <?php
    
    function comicpress_copyright_text() {
        $output = "<p class=\"copyright-info\">\r\n";
        $output .= "<span>© 2014 - <a href=\"http://rowrowboatsportfoliosite.com/\">rowrowboat </a>";
        $output .= "<span class=\"footer-pipe\">|</span> ";
        $output .= __('Powered by','comicpress') . " <a href=\"http://wordpress.org/\">WordPress</a> " . __('with','comicpress'). " <a href=\"http://frumph.net\">ComicPress</a>\r\n";
        $output .= comicpress_hosted_on();
        $output .= "<span class=\"footer-subscribe\">";
        $output .= "<span class=\"footer-pipe\">|</span> ";
        $output .= "Subscribe: <a href=\"" . get_bloginfo('rss2_url') ."\">RSS</a>\r\n";
        $output .= "</span>\r\n";
        if (!comicpress_themeinfo('disable_scroll_to_top')) {
            $output .= "<span class=\"footer-uptotop\">";
            $output .= "<span class=\"footer-pipe\">|</span> ";
            $output .= "<a href=\"#outside\" onclick=\"scrollup(); return false;\">".__('Back to Top &uarr;','comicpress')."</a>";
            $output .="</span>\r\n";
        }
        $output .= "</p>\r\n";
        echo apply_filters('comicpress_copyright_text', $output);
    }
    ?>
  14. Frumph
    Member
    Theme Author

    Posted 1 year ago #

    uhm... you know you can just go to the appearance -> comicpress options and on the [general] tab just change the copyright holder's name and url there without having to override the code ...

  15. rowrowboat
    Member
    Posted 1 year ago #

    Hahaha, no I had no idea! I thought by installing the child theme, many of those features had disappeared or something??? I love how the solution was extremely simple all along.

    Thank you both for the help!

  16. rowrowboat
    Member
    Posted 1 year ago #

    Sorry I have one more question. When I put in the url in the appearance/comicpress options/general tab, the website seems to think the url is internal and just sends me to a 404 page. Is there a way for me to make the link direct to an external portfolio site?

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic