Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #393333

    Hello,

    There are no search results in the forum that answer the following question:

    Do you recommend creating a child theme according to this WP Codex: http://codex.wordpress.org/Child_Themes before creating a full site with Enfold?

    I don’t want to put a bunch of work into a site without a child theme, then have changes/errors occur when upgrading.

    Your expertise is appreciated!

    E

    #393518

    Hi!

    Yes, we recommend using a Child Theme on any Enfold installation, you can use any method as long as the core components are present (child style.css, functions.php), you can also download a pre-made Enfold child theme here.

    Regards,
    Josue

    #402449

    I’m now implementing your enfold-child theme on a fresh installation and have a question:

    I’m following the instructions found at http://codex.wordpress.org/Child_Themes. The functions.php file that comes with your enfold-child theme is mostly blank. Do you recommend we put the .php code shown in the instructions that “enqueue” the parent theme (I have no idea what this means!).

    Here’s one of the examples shown. Which one do we use?

    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘child-style’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    array(‘parent-style’)
    );
    }

    Thank You,

    Eric

    #402980

    Hi Eric!

    Not necessary, you can leave the child functions.php blank for now. The child theme style.css file is included automatically.

    Regards,
    Josue

    #749626

    Hello Eric

    From what I have understood from the comments above is that the style.css file will get included automatically, but that the functions.php file might not. Does that mean that if I have to make any changes to the functions, I need to add some code to the functions.php file?

    I found the following code on a Smashing Magazine tutorial. Please let me know if I should use this.

    
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
    
    function enqueue_parent_styles() {
       wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }
    
    #749796

    Hi @architchandra,

    I’m not sure I understand what you are looking to achieve, could you try to explain a bit further please? If you are looking for a child theme then you can download one from here: kriesi.at/documentation/enfold/downloads/

    Best regards,
    Rikard

    #749842

    Hi @rikard

    What I meant was that I want to make some changes to the functions.php file as well in the child theme. Do I need to use the code that I mentioned earlier or would the functions.php file for the child theme start working automatically?

    #750258

    Hi,

    Ok, thanks for that. So you’re asking if you have to have the code snippet you posted in functions.php for have the default style sheet to load? If so then the answer is no, it should load anyway. A child theme will only override the parent, so the parents styles will still be used if you have a child theme active.

    Best regards,
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.