Title: Adding css to child theme
Last modified: August 31, 2016

---

# Adding css to child theme

 *  [hmahraj](https://wordpress.org/support/users/hmahraj/)
 * (@hmahraj)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/)
 * When first launching the site, in my ignorance, I made a few edits to the style.
   css **before** adding a child theme. No further changes to the style.css have
   been made since then. I now understand that after a theme udpdate, those changes
   I made BEFORE ADDING THE CHILD THEME will be wiped: the object of the edits to
   the style.css being to override the parent theme. I kept a careful record of 
   all the css I had added.
 * My question is should I add this css to the style.css file in the child theme**
   now** before the next theme update? THANKS!
    I am using the Kindergarten theme
   for this site.
 * [http://children.hersheylibrary.org/](http://children.hersheylibrary.org/)

Viewing 14 replies - 1 through 14 (of 14 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120360)
 * Yes, was there a reason why you didn’t do it now?
 *  Thread Starter [hmahraj](https://wordpress.org/support/users/hmahraj/)
 * (@hmahraj)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120361)
 * Just a bit nervous. Sounds like you might think I should go ahead and why wait?
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120362)
 * Why wait indeed, your site should look exactly the same as before. Though if 
   it doesn’t, you can always post a support topic here.
 *  Thread Starter [hmahraj](https://wordpress.org/support/users/hmahraj/)
 * (@hmahraj)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120363)
 * I have a similar situation with another site using the Twenty Fourteen theme.
   Whatever applies to the Kindergarten theme should apply, there, right? I have
   a question about making one small change to the .php in the Twenty Fourteen, 
   also before the child theme was installed. Can I ask it here, or should I begin
   another thread? Thanks, Andrew.
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120365)
 * > Whatever applies to the Kindergarten theme should apply, there, right?
 * Yes, but you may experience an issue with the specificity of your selectors. 
   Sometimes your selectors (e.g. `.footer p`) may not be specific enough, even 
   though they’d be the same as the parent theme’s styles. So you’d just add a level
   of specificity (e.g. `html .footer p`).
 * > I have a question about making one small change to the .php in the Twenty Fourteen
 * If it’s a “how do I do this” question, you can post it here but if I don’t know
   then you can open a new thead 🙂
 *  Thread Starter [hmahraj](https://wordpress.org/support/users/hmahraj/)
 * (@hmahraj)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120472)
 * I will add the css to the child themes of the Kindergarten and Twenty Fourteen
   one at a time and see the effect. It concerns exactly the same css with one exception
   for the latter. And this is how I discovered the necessity of a child theme.
   
   This is the site for the Twenty Fourteen template: [http://ya.hersheylibrary.org/](http://ya.hersheylibrary.org/)
 *  Thread Starter [hmahraj](https://wordpress.org/support/users/hmahraj/)
 * (@hmahraj)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120477)
 * Not long after site ([http://ya.hersheylibrary.org/](http://ya.hersheylibrary.org/))
   went live, the theme required an update which I did and saw that the few changes
   I made to the theme by adding css to the Editor were gone.
 * I was able to restore all changes except one by adding the css back into the 
   Editor; **except** the one that hid or removed the “Categories Archive” that 
   appeared at the top of each page/post. This was the css I used.
    `.post-navigation{
   display: none; }` It just didn’t seem to work. It could have been because of 
   browser cache that I now understand will sometimes be an obstacle to viewing 
   a change but didn’t know about at the time.
 * I searched for answers in the forum. I discovered others who had experienced 
   this issue were able to accommplish removing Categories Archived by deleting 
   a line in the header.php. So I did that, and it worked. This was still before
   the child theme was installed. Question: Are **you** able to see, or can only
   I see, if this line is still present in the parent theme? And what would you 
   advise?
 *  Thread Starter [hmahraj](https://wordpress.org/support/users/hmahraj/)
 * (@hmahraj)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120478)
 * That may have been category.php. In any case, the child theme files only have
   style.css, header.php, footer.php amd rtl.css. Should I try adding this anyway
   to the style.css?
    `.post-navigation { display: none; }’
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120481)
 * What is the bit of text I’m looking for on that page?
 *  Thread Starter [hmahraj](https://wordpress.org/support/users/hmahraj/)
 * (@hmahraj)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120482)
 * It could have been this:
    “Change this line:” `<h1 class="archive-title"><?php
   printf( __( 'Category Archives: %s', 'twentyfourteen' ), single_cat_title( '',
   false ) ); ?></h1>`
 * to:
    `<h1 class="archive-title"><?php single_cat_title( '' ); ?></h1>`
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120484)
 * I don’t see an element on your home page with the class of ‘post-navigation’ 
   view-source:[http://ya.hersheylibrary.org/](http://ya.hersheylibrary.org/)
 * But you can certainly add that CSS to your Child Theme style.css file
 *  Thread Starter [hmahraj](https://wordpress.org/support/users/hmahraj/)
 * (@hmahraj)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120485)
 * Would it hide the “Categories Archive” before each post/page?
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120486)
 * Could you link an example page that contains the text “Categories Archive”?
 *  Thread Starter [hmahraj](https://wordpress.org/support/users/hmahraj/)
 * (@hmahraj)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120495)
 * The changes I first made by adding css to the Editor were all pre-child theme
   and still today suppress the parent theme for the two sites, [http://ya.hersheylibrary.org/](http://ya.hersheylibrary.org/)
   and [http://children.hersheylibrary.org/](http://children.hersheylibrary.org/)
 * No subsequent theme update has occurred since the time of the first one related
   to [http://ya.hersheylibrary.org/](http://ya.hersheylibrary.org/) when I saw 
   my changes were undone. So, there’s nothing I can show you.
 * I was concerned about the next theme update undoing the changes unless I added
   the css. And you have answered that. Thank you, Andrew.
 * My main concern now for this site – [http://ya.hersheylibrary.org/](http://ya.hersheylibrary.org/)–
   is what to do if “Categories Archived” shows up again when this theme is next
   updated **and** after I have added all the css I recorded adding to the parent
   theme to its child theme. Does this make sense? I hope so.
 * The Categories Archive was where I am sure I removed rather than added something
   from the Editor in the parent theme. Will it just reappear in the parent theme?
 * Thank you for your patience.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Adding css to child theme’ is closed to new replies.

## Tags

 * [child theme](https://wordpress.org/support/topic-tag/child-theme/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [theme updates](https://wordpress.org/support/topic-tag/theme-updates/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 14 replies
 * 2 participants
 * Last reply from: [hmahraj](https://wordpress.org/support/users/hmahraj/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/adding-css-to-child-theme/#post-7120495)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
