• i’m a complete coding novice and i’ve got a few questions, if anyone would help me:

    1. about setup; i have woocommerce installed on a child theme called Sequential Child and a text domain of sequential-child, both specified in the beginning of my child theme’s style.css file. i seem to have successfully wrapped woocommerce in the theme by creating a woocommerce.php file and leaving it the parent theme’s directory (is this right?) and i added the following code to the child theme’s functions.php file as per the woothemes documentation:

    add_filter( 'woocommerce_enqueue_styles', 'dequeue_woocommerce_general_stylesheet' );
    function dequeue_woocommerce_general_stylesheet( $enqueue_styles ) {
    unset( $enqueue_styles['woocommerce-general'] );
    return $enqueue_styles;
    }

    this seems to work; i search on the internet for what i want to change and the code for it, i add it to the functions.php file, and 1 time out of 6 it works. the process is long and torturous, and there is so much contradictory advice in forums and videos online. did i do it right? do i just have to edit code there or am i supposed to copy over the original .php files from the plugins folder as well? and my .css changes; do i do that in the child’s styles.css file or in the woocommerce.css minified file in the child’s woocommerce folder? damn i’m confused.

    2. about localisation. this is confusing too. i don’t want to translate wordpress, but yes i do want to translate woocommerce. am i right in understanding that i put my mo and po files in sequential-child/woocommerce/languages?, but what exactly is the functions code and how exactly do i point it at the languages folder? is it this?:

    /*load translation file for woocommerce*/
    function my_child_theme_setup() {
    load_child_theme_textdomain( 'sequential-child', get_stylesheet_directory() . '/languages' );
    }
    add_action( 'after_setup_theme', 'my_child_theme_setup' );

    do i have to modify this in any way? for instance; do i have to change ‘load_child_theme_text_domain’ to ‘load_sequential_child_theme_text_domain’.

    i’m confused because other forums just mention this line of code for gettext:

    /*load tranlation file for woocommerce*/
    load_child_theme_textdomain( 'sequential-child' );

    is this right? do i need both pieces of code, or just one?

    any advice or direction would be greatly appreciated. i’s completely clueless and new at this, but it’s all terrible exciting. i’m just doubting that i’ve done the basic setup right, and the Codestyling Localisation plugin basically told me to get screwed… 🙁 but i’m not sure what i’ve done wrong.

The topic ‘[woocommerce] functions.php and localisation: did i set it up right?’ is closed to new replies.