1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to Create a Child Theme for StanleyWP?

Discussion in 'HTML & Website Design' started by toreate, Nov 3, 2015.

  1. #1
    Hello,

    I have downloaded a theme from http://gentsthemes.com/demo/stanleywp/ and I'd like to create a child theme.

    I followed the instructions from https://codex.wordpress.org/Child_Themes to the best of my (noob) knowledge.

    Now I have style.css and functions.php files in stanleywp-child folder.

    Style.css contains:

    
    /*
    Theme Name: StanleyWP Child
    Theme URI: http://www.luciddreamgateway.com/wp/stanleywp-child/
    Description: StanleyWP Child Theme
    Template: stanleywp
    Version: 1.0.0
    */
    
    Code (markup):
    Functions.php contains:

    
    <?php
    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( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.css' );
    wp_enqueue_style( 'bootstrap.min.-style', get_template_directory_uri() . '/css/bootstrap.min.css' );
    wp_enqueue_style( 'font-awesome-style', get_template_directory_uri() . '/css/font-awesome.css' );
    wp_enqueue_style( 'font-awesome.min-style', get_template_directory_uri() . '/css/font-awesome.min.css' );
    wp_enqueue_style( 'magnific-style', get_template_directory_uri() . '/css/magnific.css' );
    wp_enqueue_style( 'wpbase-style', get_template_directory_uri() . '/css/wpbase.css' );
    wp_enqueue_style( 'wpbase.min.-style', get_template_directory_uri() . '/css/wpbase.min.css' );
    }
    
    Code (markup):
    The theme isn't working and I don't know why. :-/

    Could anyone please have a look? I don't know what's wrong. Thank you!
     
    toreate, Nov 3, 2015 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    Since the theme you've chosen is a butload of bloat-code, you'll probably also need to enqueue the actual scripts (the javascripts) - also, you don't need to include both the regular and the minified version - that's just double what you need - remove all the regular ones, and keep the minified versions. Remeber to also check if the sequence of files are correct - the files needs to be loaded in a specific order, have a look at the source code when using the standard theme, and you'll see which order the css-files (and script-files) are loaded.
     
    PoPSiCLe, Nov 3, 2015 IP