Issues with childtheme - by rfrigge - on WordPress WooCommerce support

This topic has 12 replies, 3 voices, and was last updated 9 years, 9 months ago ago by rfrigge

  • Avatar: rfrigge
    rfrigge
    Participant
    February 13, 2015 at 03:50

    Hi,

    Last couple of days I did some customizations:
    I edited custom.css
    Changed color of sprites
    Added language files
    Edited some .php files

    To avoid those customazitions getting lost, I decided to move them all to a custom theme.
    I copied the woopress-child from versie 1.2 to my themes folder, so basically I copied 2 files: style.css and functions.php

    For me this did not work:
    – default style.css is not loaded, I suppose the code in the functions.php should take care of that but it didn’t. As a temp fix I Used the @import in the style.css
    – custom.css not working (as temp fix I created a custom.css in the woopress folder and included the custom.css from the chiled theme.. works for now but doesn’t make sense ofcourse)
    – Language files in childtheme folder do not work
    – edited images in the childtheme folder are ignored

    So here are my questions:
    1. Is it only me or is something wrong with the code in the childthemes functions.php? (i tried some other code I found on wordpress.org and that did work, but I rather use your code.. once it’s working.. not sure what the difference is and whether it affects other functions as the custom.css for example)
    2. Why is my custom.css not loaded?
    3. How can I use languages files in my child theme? I also have created some languages files for some plugins you delivered, i want to put these also in the child themes folder
    4. Why can I not override the sprites with the sprites i put in my child theme?

    Hope you can help me out or give me some pointer.

    Regards,
    Ramon

    11 Answers
    Avatar: Robert Hall
    Robert Hall
    Support staff
    February 13, 2015 at 08:27

    Hello,

    Please provide us with wp-admin and FTP credentials in Private Content to look on issues more deeply.

    Regards,
    Robert Hall.

    Avatar: rfrigge
    rfrigge
    Participant
    February 13, 2015 at 14:30

    Oke I cleaned up the sites content and created accounts for you.
    See details in private content. Access level of FTP is WP-CONTENT

    Please note that this is a development environment and I need to know which things need to be changed so I can implement this correct on my production environment.

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Support staff
    February 13, 2015 at 15:35

    Hello,

    We’re unable to connect to FTP getting an error:
    Could not connect to server

    Please check the credentials and provide us with FTP host.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: rfrigge
    rfrigge
    Participant
    February 13, 2015 at 15:45

    Sorry, I forgot the host see private content

    Please, contact administrator
    for this information.
    Avatar: rfrigge
    rfrigge
    Participant
    February 15, 2015 at 18:22

    Were you able to login?

    Avatar: rfrigge
    rfrigge
    Participant
    February 16, 2015 at 19:11

    Any answers / suggestions to my questions would be appreciated.

    Thank you.

    Avatar: rfrigge
    rfrigge
    Participant
    February 17, 2015 at 12:28

    Robert / Eva?

    Avatar: Eva
    Eva Kemp
    Support staff
    February 17, 2015 at 13:26

    Hello,

    Sorry for a long delay. It’s caused due to large amount of work.

    1. Add the code below to functions.php in the child theme folder and remove the “@import” line in the child theme style.css.

    <?php
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
    }

    2. If you’re using style.css of the child theme you don’t need create custom.css there as well.

    3. What plugins do you want to translate?
    Unfortunately we were unable to log in to FTP account using the details you provided.

    Regards,
    Eva Kemp.

    Avatar: rfrigge
    rfrigge
    Participant
    February 17, 2015 at 14:54

    1. I tried that before and it does work but I don’t understand what the default code in the provide functions.php is supposed to do?

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'child-style', get_stylesheet_uri(), array( 'bootstrap', 'parent-style' ) );
    }

    2. Putting al my custom.css in the child-themes style.css (which I previously already tried) will not work correct because the responsive.css will load after the style.css I cannot override responsive.css because of all the !important that is used in the responsive. So my custom css code needs to load after the responsive.css How Can I do that ?

    3. Most important translation is the theme’s translation file which is not loaded from the child theme. Besides that I translated screets-chat (which later I had to disable due to incompatibility with All in One SEO), yith-woocommerce-wishlist and woocommerce. Woocommerce translation needed to be adjusted because of some of the changes the WooPress theme does to woocommerce files.
    Where Do I put my translation files in the child theme? The default languages folder of the WooPress child Theme does not work (it worked when I did not use the child theme.. but now I moved the language files to the child theme and it doesnt work) The plugin translations I did not yet move to the child theme.

    I tested the credentials supplied and the are correct. Please not the difference in o and 0
    I use filezilla and quick connect works just fine

    4. What about sprites, can these be overruled in with a child-theme (I changed the color)

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Support staff
    February 17, 2015 at 16:53

    Hello,

    1. You can use the default code in functions.php of the child theme instead of the one from the previous post.
    2. If you want to overwrite responsive styles you need use @media element in style.css in the child theme folder. Please describe the issues with more details. What exactly can’t be overwritten?
    3. Sorry, but translation files must be located in the parent theme as they are loaded from there. Those files won’t be effective in the child theme.
    4. To change color of sprite icons you need edit the picture with some image editor.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: rfrigge
    rfrigge
    Participant
    February 18, 2015 at 13:59

    1. I did use the default code initially but that did not work (child theme had no styling at all). Is there any difference or supposed to do both statements exact the same?
    2. This part of the CSS is overrulled by de responsive.css when I put this in the child-theme child.css that is why I want to use the custom.css like I could do when not using a child theme.

    @media screen and (min-width: 1200px) {
    	.products-grid .product-category{
    	margin: 10px;
    	width: 250px !important; 
    	}
    	
    	.row-count-3 .product-category, .products-list .product-category{
    	width: 250px !important;  
    	}
     }

    See private content for link.

    3. Oke, too bad. I guess that’s a wordpress childtheme restriction.
    4. Ofcourse I changed the picture but my question was whether this should should work when the edited picture was placed in the child-theme folder. But I guess that just like the language files the picture needs to be in the parents theme folder?

    Considering all things above, i’m not to happy about using a child theme: I still need to changes files in my parent theme’s folder so they might get overwritten with an update, and custom css cannot be used anymore leaving me with the resposive.css overruling my customizations (or maybe you have solution for that).

    Please, contact administrator
    for this information.
  • Viewing 12 results - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.