WordPress.org

Forums

Child Themes not working properly? (19 posts)

  1. Andor Nagy
    Member
    Posted 2 years ago #

    Hey, I just made my own framework and want to create some child themes.
    My framework's folder's name is "framework"
    The child theme's folder's name is "Andor"

    And the content in the child theme's style.css is the following

    /*
    
    Theme Name: Andor
    
    Description: Test theme
    
    Template: framework
    
     */
    
    @import url("../framework/style.css");

    But no matter what I try to add into the style.css it isn't showing up. Only If I copy the index.php and change something there. But styles don't.

    Any idea?

    Regards, Andor Nagy

  2. Andrew
    Forum moderator & snail smusher
    Posted 2 years ago #

    Is the name of your theme, "framework" ?

  3. Andor Nagy
    Member
    Posted 2 years ago #

    Yes. And when I activate the child theme, and look at the page source in chrome, the theme doesn't gets the style.css from the child-themes folder.

  4. Andrew
    Forum moderator & snail smusher
    Posted 2 years ago #

    Can you post a link to your website, with the Child Theme activated?

  5. Andor Nagy
    Member
    Posted 2 years ago #

  6. jmag
    Member
    Posted 2 years ago #

    Are you uploading the theme via FTP or through the WordPress theme installer? If via FTP, what folder did you place the child theme in? It should be wp-content->themes->Child theme. This places the child theme folder directly next to the parent theme folder.

    Also you may need to include the Author information in the theme css header.

  7. Andor Nagy
    Member
    Posted 2 years ago #

    I have it installed on my PC localhost.

    by wp-content->themes->Child theme. you mean

    wp-content/themes/child-theme/my-child-theme

    or

    wp-content/themes/my-child-theme

  8. jmag
    Member
    Posted 2 years ago #

    The second one, wp-content/themes/your-child-theme. The child theme folder should be next to the parent theme folder.

  9. Andor Nagy
    Member
    Posted 2 years ago #

    It is, and it still isn't working.

  10. jmag
    Member
    Posted 2 years ago #

    Just tried to look at your site a couple of times and it is not loading. I just get the browser loading icon, connection message showing but nothing appears. There may be a problem with your server or setup which is causing the issue.

  11. Andor Nagy
    Member
    Posted 2 years ago #

    Theres no problem with it. I just stopped XAMPP

  12. jmag
    Member
    Posted 2 years ago #

    In the child theme are you keeping the style.css inside another folder? If it looks like this wp-content/themes/my-child-theme/styles-folder/style.css then this will cause your issue.

  13. Andor Nagy
    Member
    Posted 2 years ago #

    No, I'm not.

  14. jmag
    Member
    Posted 2 years ago #

    Test importing the parent styles directly in the child them markup. If you have a header file place it there, if not place it in the body of the HTML, forget about invalid markup this is just for testing.

    The first one will display the url of the parent theme, the second the child theme. This will let us know what WordPress thinks is going on. Look at results in Chrome or firebug.

    '<style>
    @import url("<?php bloginfo('template_url'); ?>/style.css");
    @import url("<?php bloginfo('stylesheet_url'); ?>");
    </style>'

  15. Andor Nagy
    Member
    Posted 2 years ago #

    It works now, I imported the style.css in the header using
    '<style>
    @import url("<?php bloginfo('stylesheet_url'); ?>");
    </style>'

  16. jmag
    Member
    Posted 2 years ago #

    Great. Did the paths WordPress display match what you expected?

  17. Andor Nagy
    Member
    Posted 2 years ago #

    Not really, Now the child theme's style.css is also imported into the main framework. But nvm

    Thanks for your help =)

  18. Sapphire
    Member
    Posted 2 years ago #

    I'm having this problem, too. It was working before the theme author updated his theme, and then it suddenly stopped. The style.css file is where it always was in the parent theme, and I didn't change anything in the import call in my child theme style sheet. But it's just not importing it.

  19. WPyogi
    Forum Moderator
    Posted 2 years ago #

    @Sapphire - as you can see, this is a very old thread. Please start your own thread and include a link to your site.

Topic Closed

This topic has been closed to new replies.

About this Topic