Support » Themes and Templates » Tiny Forge » [Resolved] Question about .site background-color and functions.php

[Resolved] Question about .site background-color and functions.php

  • I have added this color modification in style.css for my re-named Tiny Forge Child Theme:

    .site {
    	background-color: #f9f5db; /* light grayish yellow */

    That works fine as long as I do not have any functions.php file in the folder for my Child Theme, but then when I add the tinyforgechild functions.php, that color no longer displays in my footer widget areas and I cannot figure out what to change where in the tinyforgechild footer.php file. I am assuming I need to change “tinyforgechild” to match the name for my own Child Theme, but my efforts at trying that so far have only resulted in blank screens.


    Can you point me in a right direction here?

    Many thanks.

Viewing 15 replies - 1 through 15 (of 16 total)
  • PS: I do not think this matters, but I might have previously had the default tinyforgechild Child Theme activated. But since I cannot find anything related to it in the database, it looks like I just need to get my own footer.php to match the name of my own Child Theme.

    I didn’t have time to investigate it yet, but just a thought…

    If you were using child theme without functions.php, that means you had to plug in the style.css of the main theme with @import.

    When you add functions.php it plugs in the main style sheet again. Usually main style.css should go before child theme’s style.css in order for the child to override the rules, but perhaps the order of loading changed?

    When I had no functions.php, the style modifications in my Child Theme that is not named “tinyforgechild” still worked…but then adding the tinyforgechild functions.php brought in the tinyforge parent sheet and overwrote my Child Theme since functions.php was looking for “tinyforgechild” rather than my differently-named sheet. So, it seems the child sheet is getting things started only to have to be called again later after functions.php has called the parent sheet.

    Original style.css from the child theme have @import commented out. So normally, if you use a provided child theme example, without functions.php you would not get styles from the parent theme, which is required.

    Unless WP now finds parent css automatically, but I highly doubt that is the case.

    The style.css of the active theme is processed, and then anything after that is optional. With Twenty Twelve, I have been using a full sheet with a template line and no @import line. I could do the same here and just delete the lines in functions.php that are calling for any sheet, but then I would still be left with the challenge of finding and rewriting anything else either there or anywhere else that is expecting to be able to find “tinyforgechild”. Not complaining, of course, just trying to discover how difficult that would actually be since I really only know how to do little more than to cut-and-paste!

    You see, that’s why you have to start with the provided child theme’s style.css, because it gives you an empty structure and makes it easy to port things one by one. By not importing parent styles you lose all updates related to the style, when they will come.

    Another thing with having only few things in your child style file, makes it easy to understand what you do and how it works 😉

    But if you want to start, I better send you an updated child theme’s style.css.

    If I continue with Tiny Forge, it will be by using a full sheet in my Child Theme and replacing the string “tinyforgechild” wherever it might exist..and I am assuming it does not exist within Tiny Forge, the parent. You are certainly under no obligation here, but my question is about whether “tinyforgechild” is present anywhere other than within its own functions.php…and either way, Tiny Forge is a nice theme and I will have learned from the overall experience of at least beginning to use it.

    “tinyforgechild-style” is just the name, so you would now what style it is, the real info gets pulled by this:


    This native WP function points directly to style.css in the child theme’s folder

    Same for parent sheet. What matters is:

    get_template_directory_uri() . ‘/style.css’

    I thank you for your patience with me as I learn here! At the moment (and only temporarily), I am not using functions.php in my renamed Tiny Forge Child Theme and everything from my full style sheet in my Child Theme is working just as it should. So, and with my previous beginnings considered, that means the default Child Theme for Tiny Forge does cause that sheet to be processed a second time after functions.php has called for the parent sheet (which had not happened in my case apparently because the child sheet was in a folder with a different name and could not be found).

    As to the color problem I had mentioned at the beginning of this thread, that is/was simply a matter of Tiny Forge having a separate color entry for the footer area by default where Twenty Twelve does not.

    Many thanks!

    Learning is good, but it is always better to start right from the beginning, because unlearn bad habits is even harder 😉

    So take that empty template and start having programming fun the right way :)))

    I not have quite understood-making the affiliated subject without fall?
    I already question, what change the background of the messages blog, but me nobody does not answer. What line is in css to have charge of background blogs record?
    And what do the messages in the manner of announcement?

    Is this a google translate text? It’s very hard to understand… if you are from Ukraine, can you just type it in Russian – I understand Russian.

    Also, is it related to Tiny Forge theme?

    Да я уже тут написал, потому что по 2012 не отвечают, а вопросы у меня те же. Подскажите пожайлуста, в какой строке css сменить белый фон? Вот мой блог http://blog.tef.co.ua/

    /* Page structure */
    .site {
    	padding: 0 24px;
    	padding: 0 1.714285714rem;
    	background-color: #fff;

    I suggest you to use FireFox Inspector to see what styles are affecting the elements:

    You can activate it with: CTRL+SHIFT+I

    and select with the mouse element you need.

    Браво! Спасибо большое! Вы-гуру!!! Я поучусь так определять классы, а то я уже столько просмотрел в файле и не мог найти.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Resolved] Question about .site background-color and functions.php’ is closed to new replies.
Skip to toolbar