WordPress.org

Ready to get started?Download WordPress

Forums

Child theme not doing what it´s supposed to (4 posts)

  1. goldenroadtraveller
    Member
    Posted 3 years ago #

    I recently download the adventure-journal theme and although it was fantastic for my simple needs, I wanted to make a few minor changes, so I made a child theme, put it in my themes directory, activated it in my appearance settings in dashboard, and so far so good.

    The problem came along when I copied to my child theme the on the fly changes I made in firebug to the css (which did work in the site display!!) with firebug they show, but when I toss them on to the style.css of the child theme, nothing when I reload!

    Any suggestions anyone? I might add that I´m new to all of this and learning as I go. thanks.

    here is my basic child code with minor change I tried making below, I don´t think anything is off with it:
    /*
    Theme name: Adventure2
    theme uri: http://localhost/wordpress/wp-admin/
    Description: childtheme for adventure-journal
    Author: Stephan
    Author uri: http://localhost/wordpress/wp-admin/
    template: adventure-journal
    version: 1.0
    */

    @import url("../adventure-journal/style.css");

    #site-description {margin-top:12px;font-size:19px;}

  2. stvwlf
    Member
    Posted 3 years ago #

    Without looking at your site its not possible to give specific instructions. Usually when you have a situation that it works in Firebug and not when you add to your them its because the CSS you add to the theme is not specific enough.

    Go back to Firebug and see where in the order of styles applied to the page element your added CSS is appearing. Usually what happens is CSS that is more specific than what you added is overriding your new additions. When you look at what is overriding it you can add additional selectors in front of yours to make yours more specific.

    Example:
    you target .some-class a

    you find #content a is being applied ahead of yours. You need to make yours #content .some-class a

    Then it is more specific than #content a and overrides it. Repeat this until you resolve the issue.

    If you don't see your styling at all, either you have a typo or the selector is not specified correctly, thus its not being applied to the page element. After you are certain you have correctly specified the selector and its not being applied, check View Source (or use Firebug in the <head> section) to confirm that your child stylesheet has been located by the browser and is being applied.

  3. goldenroadtraveller
    Member
    Posted 3 years ago #

    Thanks for the advice, I was going to do as you recommended, but then visited the theme designers website, where they recommend making a theme override.css file in wp-content and using this as a custome stylesheet for editing the theme´s css. I didn´t bother looking into it further, but I assume that the theme just isn´t very friendly to child theme generation the normal way (can this be the case?)

    Either way, works now.

  4. stvwlf
    Member
    Posted 3 years ago #

    An overriding stylesheet is just another approach for accomplishing the same thing I was referring to. The point is you are overriding some of the parent theme's styles, whether in the child theme's style.css or in a child or parent theme's override.css

Topic Closed

This topic has been closed to new replies.

About this Topic