• Resolved Qjoobsian

    (@qjoobsian)


    1. Is it correct that header, background and for example the pages menu structure needs to be redone once a new twentytwelve child was installed?

    2. I am just not sure that what I see is what it should be. There is a line in the ‘current theme’ info that says: This child theme requires its parent theme, Twenty Twelve.
    Is this correct or does it refer to some failure?

    3. Assuming the child theme was imported correctly. Where do I actually edit the coding to make sure not to lose anything with a next update. I guess I copy from the original 2012 style.css, paste this into the 2012 child style.css?
    So after a while the child style.css will grow?

    For your information. Since I wasn’t sure things went okay I made a child theme in two occassions and two different ways.
    1st: based on the wp codex child theme info and ftp
    2nd: by using the One Click Child Theme plugin.

    Both had the same effect in terms of my 3 questions above.
    Am I on the right path?

Viewing 7 replies - 1 through 7 (of 7 total)
  • 1. yes – activating a child theme is like activating a new theme.

    2. to use a child theme, the parent theme has to be present in the themes directory (usually it is there anyway).

    3. of any template, which needs editing, you will need to save a copy into the child theme’s folder, and edit it there. with css, you would use the @import rule and then only copy those styles into style.css of the child theme, which are needed to overwrite whatever you want to change.

    (I have no experience with that particular plugin)

    Thread Starter Qjoobsian

    (@qjoobsian)

    Thx @alchymyth
    A few more questions, in my own words, just to make sure..
    1. thx, noted
    2. this is what is in the style.css of the twenty twelve child theme in the wp-content/themes folder, is it correct? >

    /*
    Theme Name: Twenty Twelve Child
    Description: Child theme for the Twenty Twelve theme
    Author: my name
    Template: twentytwelve
    Version: 0.1.0
    (optional values you can add: Theme URI, Author URI, Version)
    */
    @import url(“../twentytwelve/style.css”);

    3. I don’t know how to handle css. I mostly try to find out in the html code (and online info) what needs to be changed. Is it safe to say that once I know what I like to change (for example sizes/colors of fonts)> I copy the original code from the twentytwelve style.css into the twentytwelve child style.css, change it, save it and that should do it?

    4. after the child theme was activated, I had to redo the header. I picked it from the media libary. Now there are two of the same headers in the media library. Is it correct that the twentytwelve AND twentytwelve child share the same media library?

    4a. If using the twenty twelve child theme, do I need to change the Uploads folder under Settings > Media into the child folder as well or does this remain unchanged?

    5. I would also like to add a slideshow plugin. I assume I install it as usual and since the twentytwelve child theme is activated I don’t loose it after an update?

    2.
    looks ok; the proof is if it works.

    3.
    generally ok.

    4.
    correct; there is only one media library per site.
    4a. same uploads folder.

    5.
    plugins are (mainly) theme independant; i.e. stay activated and unchanged when you switch themes. with a slideshow plugin, I would imagine that some settings might need to get adapted only when you switch themes; not because of an update of the parent theme.

    Thread Starter Qjoobsian

    (@qjoobsian)

    Thx @ alchymyth
    Wauw, sounds pretty exciting. Now I can go ahead.
    Cheers from NL

    Thread Starter Qjoobsian

    (@qjoobsian)

    @alchymyth, Oops
    One thing pops up in my mind. Regarding point

    3. I don’t know how to handle css. I mostly try to find out in the html code (and online info) what needs to be changed. Is it safe to say that once I know what I like to change (for example sizes/colors of fonts)> I copy the original code from the twentytwelve style.css into the twentytwelve child style.css, change it, save it and that should do it?

    Do I copy ALL original twentytwelve code into the twentytwelve-child, or just the lines that I like to edit?

    just the lines that I like to edit

    that is the one.
    you would need to edit the style in a way to overwrite the one of the parent theme.

    the other styles are imported by this line:

    @import url("../twentytwelve/style.css");

    example:
    remove the grey space above the page;

    this is formatted with the top margin in this style in the parent style.css:

    body .site {
    		padding: 0 40px;
    		padding: 0 2.857142857rem;
    		margin-top: 48px;
    		margin-top: 3.428571429rem;
    		margin-bottom: 48px;
    		margin-bottom: 3.428571429rem;
    		box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3);
    	}

    this is the line: margin-top: 3.428571429rem;

    in the style.css of the child theme, it would not work just to remove this line from the style, you would need to explicitely set a new top margin, like:

    body .site {
    		margin-top: 3.428571429rem;
    	}

    you will only need to add this margin-top line, as this is (in the example) the only formatting you want to change in this style.

    Thread Starter Qjoobsian

    (@qjoobsian)

    Brilliant, tested it and works.

    However I understand that it is really important to know exactly what part of the code must be copied to the child theme including the } etc.
    I also learned that a heavy loaded child theme style.css could make the site slower.
    Very cool that only the lines that one wants to edit need to be copied to the child theme. The @import does the rest. Smart!

    Cheers again Alchymyth

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Twentytwelve Child theme focussed questions’ is closed to new replies.