WordPress.org

Ready to get started?Download WordPress

Forums

Child theme CSS changes not showing up on site (22 posts)

  1. rileybetka
    Member
    Posted 1 year ago #

    Hello - I am fairly new to WordPress and since completely re-doing my site about 6 or 7 times - I have decided to start using a child theme - I have followed all of the instructions for creating a child theme and I have activated it. I am new to CSS but it seems like all of the things that I have been adding to my css file in the editor are not taking effect at all. To test the theory that I just don't know what I am doing - I found css that someone who obviously knew what they were doing and pasted it in my file to see if it made any changes - it did not. I have created a folder in /themes called /themes/childtheme - as I mentioned I have activated it so I know that WP is recognizing it (it says in the themes screen that this is a child theme for the parent theme twentytwelve. On a side note - I have copied the header.php file to this directory and made changes to it and those changes are apparent on the page so it must just be something with this particular file. It is named style.css and it is located in the /childtheme folder. This is what is in the file right now:

    /*
    Theme Name: Childtheme
    Description: Child theme for the TwentyTwelve theme
    Theme URI: http://www.wordpress.org
    Author: Riley Betka
    Author URI: http://www.daily-mash.com/
    Template: twentytwelve
    version: .1
    */

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

    for right now I am really just trying to change the main content area background to black. I have added
    #page {
    background-color: black;
    }
    #content {
    background-color: black;
    }

    It seems like that should be changing the color but it does nothing - can anyone help me figure out what I am doing wrong? Seems like it is something small and stupid that is preventing my changes from taking effect. I am trying to start playing around with CSS and so far this is quite the let down - thanks in advance for your help!

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Can you post a link to your site? CSS is pretty impossible to diagnose without looking at the actual site live.

  3. gugutz
    Member
    Posted 1 year ago #

    The twenty twelve theme uses the .main class to customize the main content area, which includes the site content and the sidebar.

    If you mean the div where the posts are displayed, the class would be .primary, and the posts are article tags

    Try adding this to your style.css file and see if it helps.

    .primary {
    background-color: black;
    }

  4. rileybetka
    Member
    Posted 1 year ago #

  5. rileybetka
    Member
    Posted 1 year ago #

    gugutz: I tried this and it did nothing - I don't think it's a problem with what I am putting in the css because NOTHING seems to make a change - even when I paste css that other people have written

  6. rileybetka
    Member
    Posted 1 year ago #

    I found something else that said to change something in my header file but I tried that and it didn't seem to do anything either...something about changing a call header from ?php echo get_template_directory_uri to ?php echo get_stylesheet_directory_uri

  7. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Where are you putting the code -- I see nothing in the child theme CSS file.

    Do you have any caching on your site?

  8. rileybetka
    Member
    Posted 1 year ago #

    I don't know if I have caching on my site or not - how do I determine that? I have been making changes to the file via the editor in wordpress and clicking update file. I have noticed that sometimes there is a strange lag when I make changes and save them - sometimes they don't show up until the next day - sometimes they are instant - very peculiar

  9. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    That sounds like caching - look at your plugins - anything like SuperCache or something similar. It's also possible that your host uses caching.

  10. rileybetka
    Member
    Posted 1 year ago #

    I know that I have not added any plugins to this wordpress install - I use ipage as my webhost - is there a way to find out in my cpanel and if so can I turn it off?

  11. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    You'd need to check with them. Does this happen even in the default theme (not child)? It looks like your child theme is set up right - are you then making changes in the child theme style.css file? Just as a test try adding this there:

    .entry-content p, .entry-summary p, .comment-content p, .mu_register p {
        color: red;
    }

    Save it, clear your browser cache and see if it shows up on the page - "Home" page title should be red.

  12. rileybetka
    Member
    Posted 1 year ago #

    I just don't feel like it should be so difficult to do something as simple as changing the background of my content area - can't wait until I start trying to create templates for my category pages. Why is there so much crap in my header.php file? Seems like it should be pretty simple to display a header image in the center of the page and somehow the php file is like a page and a half long - doesn't make it easy to make minor adjustments to things...

  13. rileybetka
    Member
    Posted 1 year ago #

    I pasted that in my childtheme style.css and clicked update file - I cleared my browser's cache and reloaded the page - no change

  14. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    No it shouldn't be and isn't usually this problematic. The header.php file has lots of stuff that makes a website run - more than what is on your pages.

    So do changes you make to your chile theme -- adding content or whatever, show up right away?

  15. rileybetka
    Member
    Posted 1 year ago #

    So now I went to my other computer and loaded the page and the word home is showing up in red...how the heck am I supposed to tweak and edit this thing if the changes don't show up right away?

  16. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    That's a caching issue. Check your browser settings and clear the cache, cookies, etc. If it's a server cache - check with your hosts.

  17. rileybetka
    Member
    Posted 1 year ago #

    So I did some digging on ipage and found this - I don't fully understand it but it seems like this may be the source of most of my frustration - I don't really get what it means by rename all images and links to make it update instantaneously...any ideas?

    Configure Akamai after purchase
    After you have purchased the Akamai, the following process occurs:

    iPage modifies your DNS, so that all new traffic requesting your site routes through Akamai's servers. The change takes a maximum of 24 hours, but often as little as 2 hours.
    iPage sets up browser caching on your site as part of the Akamai configuration. This configuration allows your site to maximize the benefits offered by the Akamai solution.
    iPage redirects all requests for yoursite.com to http://www.yoursite.com, where "yoursite" is your domain name. If you wish to change this default setting, to redirect to another subdomain, you may do so through the Akamai tool page. Akamai works exclusively on subdomains to avoid collision with existing DNS MX records that may be associated with the base domain.
    Route your site through Akamai when using custom Nameservers
    When using non-iPage nameservers, you can still use Akamai. However, you need to make the following adjustments to your DNS settings at the nameserver you use:

    For each subdomain you would like to route through Akamai you will need two CNAMEs:
    a CNAME record pointing http://www.yourdomain.com to ipage-cust.com.edgekey.net
    a CNAME pointing origin-www.yourdomain.com to yourdomain.com

    where http://www.yourdomain.com is the subdomain being routed through Akamai

    ยป Back to top
    Troubleshooting
    I changed my pages, but the new content is not showing up
    Your site's images, CSS, and javascript are cached on Akamai's servers for 4 hours. You will automatically see your new content when the servers renew.

    If you wish to change your site instantaneously, rename your images and all links to the images, to force the new content.

  18. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Why are you using Akamai? You'll need to ask them or your host for help with it.

  19. rileybetka
    Member
    Posted 1 year ago #

    the host just says that they use it - I don't know if it's an option.

  20. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    That seems like a significant problem to me. In this case, these is nothing to rename (i.e. as with an image). I'd ask ipage if there is a workaround - hard to imagine how anyone would put up with a 4 hour delay on a CSS change??

    Maybe another host would be the best solution?

  21. rileybetka
    Member
    Posted 1 year ago #

    yeah I sent them an email - I guess I will see what they say - I appreciate all of your help!

  22. MaxTrix
    Member
    Posted 1 year ago #

    I had a similar problem on my site [No need to link your site]. My browsers (FF, Opera, Crome, all the same) showed the old version of css, even after cleaning the cache.
    Finally I found out that "the problem" was caused by Cloudflare I use because it act as a cache plugin.
    So if your problem still exists, try to temporarily turn off cache plugin you may have. If you use Cloudflare, just push the "Purge cache" button.

Topic Closed

This topic has been closed to new replies.

About this Topic