• Resolved BarryB64

    (@barryb64)


    [ Moved to the Fixing WordPress sub-forum. ]

    Could someone please help me with figuring out what I did wrong? For the past week, I have been working on a revamped version of my site: https://www.inspiration-point.org and I’m using the Mason Brick theme.

    As you can guess, I found a lot of things to tweak and I’ve moved the CSS codes from the “Additional CSS” over to a child theme. WordPress is able to recognize the child theme.

    There is just one problem. The codes works fine in the Customizer; however, it is not working when it’s placed on the style.css file. Any ideas of what I’m missing? I’ve even gone so far to add the @import command.

    /*
     Theme Name:   Masonry Brick Child
     Theme URI:    https://www.inspiration-point.org/masonry-brick-child/
     Description:  Masonry Brick Child Theme
     Author:       Barry Brindisi
     Author URI:   https://www.inspiration-point.org
     Template:     masonry-brick
     Version:      1.0.0
     License:      GNU General Public License v2 or later
     License URI:  https://www.gnu.org/licenses/gpl-2.0.html
     Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
     Text Domain:  mason-brick-child
    */
    @import url(“../mason-brick/style.css”);
    
    .site-title-box {
        background: transparent;
        border: none;
    }
    
    .entry-title, .page-title {
        font-family: Roboto, sans-serif;
    }
    .comments {
    		display:none;
    }
    .entry-footer .tags-links, .entry-footer .cat-links {display: none;
    }

    In case it’s needed, here is the code for the functions.php file:

    
    <?php
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    function my_theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }
    ?>
    
Viewing 4 replies - 1 through 4 (of 4 total)
  • there are not a lot of styles in the child theme – which of these exactly are not working?
    and where (in which post or page or archive) does this show as a problem?

    Thread Starter BarryB64

    (@barryb64)

    Right now, I am using a workaround. Simply put, I placed all the CSS codes into the “Additional CSS Code” section on the Customizer. So, the theme is working. Otherwise, there would be no indication of change.

    The problem begins with .site-title-box and down. When I place these codes in the “Additional CSS” section; I’d get the usual colors indicating the code is working. In the Editor, there are no such visual clues. If I remove the codes from “Additional CSS” then I get none of the changes indicated by the CSS codes.

    Firstly, your site is linking both stylesheets, so there’s no need to use the @import command in your child theme.

    Secondly, when I look at your site it looks like it’s working corretly. The styles for .site-title.box are coming from your custom CSS firstl,y but when I turn those off they come from the child themes stylesheet as it’s meant to.

    Thread Starter BarryB64

    (@barryb64)

    Hi @catacaustic,

    Problem solved. It helps to go to bed and wake up with fresh eyes. ?? I got rid of the @import command. I commented out the custom codes in Customizer and tried again. This time, I refreshed my browser.

    Now, it’s time to work on the menu navigation. I do have a problem but I’ll create a different thread.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Troubleshooting CSS code?’ is closed to new replies.