WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding logo + other stuff to 2012 (6 posts)

  1. kfelix
    Member
    Posted 1 year ago #

    Hi everyone,

    I would like to edit the theme TwentyTwelve on a few things:
    1- Put a logo next to the written title;
    2- Add the "author" item in the articles;
    3- Remove the "Website" field from the comments.

    Even though my knowledge of html and php is minimal, I managed to do these things on my own on some themes, but I've been told it's better to use this so called "child theme" to edit the themes, so that when these get updated, I won't lose any change I made.

    So reading around the Internet, I haven't been able to fully understand how to use this child theme. I only managed to create a theme with the same CSS file of twentytwelve.

    What I need to know is how to add changes to the main theme using the child theme (a practical example with one of the issues above would be awesome) and also how to add the logo manteining the responsiveness.

    I've not got a blog online yet, I'm working on this theme locally.

    I tried to be as much clear as possible, hopefully you can understand my english.

    Here are some screenshots to explain better what I'm looking for:

    Logo
    Website
    Author

  2. leejosepho
    Member
    Posted 1 year ago #

    I haven't been able to fully understand how to use this child theme. I only managed to create a theme with the same CSS file of twentytwelve.

    If I am reading you correctly, you have made a Child Theme by copying TwentyTwelve's style.css over into the folder for your Child Theme. If so, that is not good. The only things that should go inside your Child Theme's folder are your modifications and/or additions...then WordPress gets the remainder from the Parent Theme.

    Here are the basic elements of a Child Theme:

    /*
    Theme Name: Twentytwelve Child (or whatever theme-&-folder name you might already have)
    Description: Child theme for the twentytwelve theme
    Author: Your name here
    Template: twentytwelve
    */
    
    @import url("../twentytwelve/style.css");

    http://codex.wordpress.org/Child_Themes

    If you actually do already have a Child Theme, just reduce its style.css to the above and *then* begin adding your modifications to it (and/or adding other files such as .php files) inside your Child Theme folder.
    If you do not already have a Child Theme, that link just above will give you a few more details so you can add one inside your existing themes folder inside wp-content.

  3. kfelix
    Member
    Posted 1 year ago #

    Thanks Leejosepho for the quick response.

    I've already done what you suggested, but I don't clearly understand is if I should either create a brand new, perhaps, single.php file and copy the code from 2012's one then edit it, or edit directly the 2012's one.

    If I choose the first option, will the 2012's updates affect my theme? I guess they won't, but an explanation on this matter would be really appreciated.

    Thanks again.

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Yes, you would copy the file you want to change into your child theme - and make the changes in the child theme version. Your site will use that file in place of the parent one.

    Child theme files won't be affected by updates to the parent theme. (Don't edit any files directly in the 2012 theme - those will be overwritten upon updates to WP.)

  5. leejosepho
    Member
    Posted 1 year ago #

    I don't clearly understand is if I should either create a brand new, perhaps, single.php file and copy the code from 2012's one then edit it, or edit directly the 2012's one.

    Putting up the logo you have mentioned, for example here, means copying the parent's entire header.php into your Child Theme and then making the necessary modifications and/or additions right there...and I believe WordPress then ignores the parent's header.php file. However, I believe functions.php works differently since you leave the parent's functions.php alone and just add a functions.php inside your Child Theme folder. I am still a rookie here, but that is what I have.

  6. kfelix
    Member
    Posted 1 year ago #

    Thank you both for the help, I think I now know how to handle a child theme.

    Didn't manage to try these stuff yet but I guess it won't be that hard.

    Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Topic