badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

child theme for ultimate

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #38701
    Jo
    Participant

    Hey guys,

    I am really hoping that you can help me!
    I need to upgrade the ultimate theme to Version 1.0.6. – therefore I tried to create a childtheme…

    What I have done so far:
    1. create a folder: “ultimatechild”
    2. creaty a style.css:
    /*
    Theme Name: ultimate child
    Theme URI: http://XXX.de/
    Description: Child theme for the ultimate theme
    Author: J.L
    Author URI: http://XXX.de/
    Template: ultimate
    Version: 1.0
    Tags: light, dark, right-sidebar, responsive-layout
    */


    @import
    url(“../ultimate/style.css”);

    3. create a functions.php:
    <?php
    /**
    * Theme Name child theme functions and definitions
    */

    /*—————————————————————————————————————————*/
    /* Include the parent theme style.css
    /*—————————————————————————————————————————*/

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

    }

    When I activate the child theme on wordpress, the Header is missing and the menue doesn’t work correctly…

    Please tell what I need to do, I need to upgrade the ultimate theme and also wordpress in General 🙁

    Best regards,

    Jo

    #38752
    Jo
    Participant

    I solved the Problem! 🙂

    #38778

    That’s great Jo

    Thank you!

    #39916
    timurberk
    Participant

    How did you solve the problem?

    #39925

    Hi timurberk,

    We have replied many times how to create a child theme. To create a child theme create a folder name ultimate-child inside wp-content-> themes-> (your folder name)
    Create style.css file and add this below code

    /*
    Theme Name: Ultimate Child Theme
    Theme URI: https://www.themehorse.com/themes/ultimate
    Author: Theme Horse
    Author URI: https://www.themehorse.com
    Version: 1.0
    License: GNU General Public License, version 3 (GPLv3)
    License URI: http://www.gnu.org/licenses/gpl-3.0.txt
    Text Domain: ultimate
    Template: ultimate
    */
    
    @import url("../ultimate/style.css");

    So that your child theme is create.

    Thank you!

    #40262
    bruno
    Participant

    Hello,

    As codex say, it seems that @import is not the best way to import css :

    The final step is to enqueue the parent and child theme stylesheets. Note that the previous method was to import the parent theme stylesheet using @import: this is no longer best practice. The correct method of enqueuing the parent theme stylesheet is to add a wp_enqueue_scripts action and use wp_enqueue_style() in your child theme’s functions.php.

    So how would you suggest to change the way to import css as it is not very clear for me ?

    Thank you.

    #40279

    Hi bruno,

    As @import is the easy way to import css for the user which does not have any issue using this. For the developers who submit ticket in wordpress.org also use this way to import css. Yes you can import using hook too. Using hook is the best and the latest way to import css. If you are familier with code then you can use hook to import the css.

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

    For more info you can visit here too

    I will suggest that if you are good at coding then you can use action hook otherwise using @import would be ok.

    Thank you!

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