WordPress.org

Ready to get started?Download WordPress

Forums

Blaskan
Child theme not working (6 posts)

  1. tidybag
    Member
    Posted 2 years ago #

    I created a child theme but it wasn't having any effect. Eventually I figured out that in /wp-content/themes/blaskan/functions.php where it says:

    wp_enqueue_style( 'blaskan-style', get_template_directory_uri() . '/style.css', array(), false, 'screen' );

    instead it should say:

    wp_enqueue_style( 'blaskan-style', get_stylesheet_directory_uri() . '/style.css', array(), false, 'screen' );

    This returns the child theme directory instead of the parent theme directory.

    Rather than edit the parent file, you can create a functions.php file in the child directory, copy the whole CSS init function, and edit it there.

    http://wordpress.org/extend/themes/blaskan/

  2. fishtron
    Member
    Posted 2 years ago #

    HI, this got fixed recently (https://github.com/persand/blaskan/issues/38). If you get the latest from github you won't have to hack the functions.php!

    https://github.com/persand/blaskan/zipball/master

  3. JonJaxn
    Member
    Posted 2 years ago #

    Thanks tidybag, your initial fix worked nicely. I understand why you suggest to not edit the parent file, but (and I'm pretty new to this) just exactly what would you put in that new file? Please?

  4. Per Sandström
    Member
    Theme Author

    Posted 2 years ago #

    Thanks for reporting this issue fishtron.

    JonJaxn:
    You should never ever edit any of the files that comes with Blaskan. If you do so your changes will be gone each time you upgrade to a newer version.

    If there's something you can't override in the Blaskan theme when using a child theme please let me know (post a new thread in this forum) and I'll look into it. One of my highest priorities when developing Blaskan is to make it as flexible as possible.

    To make things even easier for anyone who wants to create a child theme for Blaskan I've created a Blaskan child theme boilerplate. Download it from GitHub, read the instructions in readme.txt and then start put your customizations into it.

  5. CTauthorstrl
    Member
    Posted 2 years ago #

    I am currently running blaskan 2.4.1 at connecticutauthorstrail.org.

    I went into themes, created blaskanchild and inserted your style.css under the child. I get the following message: The parent theme is missing. Please install the "blaskan" parent theme.

    So I figured the template needed to be blaskan 2.4.1. but this did not work.
    Then changed import url("../blaskan.2.4.1/blaskan/style.css"); This did not work either.

    I am really new at this, so could you tell me what I am doing wrong? I tried creating a twenty eleven child and had no problem, so I seem to have the basics.

  6. CTauthorstrl
    Member
    Posted 2 years ago #

    Found out what I did wrong. When creating theme blaskan - created theme blaskan 2.4.1 and loaded blaskan under it. Theme = blaskan.2.4.1/blaskan/all the files. This worked fine, but did not allow for child. Deleted all and only created blaskan and info under it and child works. Theme = blaskan/all the files.

    Something simple, but I did not realize that I should have not used the version number as theme when I extracted blaskan 2.4.1.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags