ThemeShaper Forums » Thematic

[closed]

Can't link stylesheet via functions.php

(4 posts)
  • Started 1 year ago by logish
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. logish
    Member

    Hi, I followed the instructions as per http://themeshaper.com/2009/04/30/modular-css-wordpress-child-themes/ to link my stylesheets via the functions.php. But it isn't working.

    Using @import on style.css works fine. But linking the same stylesheet files using 'SOLUTION 2: FILTER THE PARENT THEME' on the guide leaves the page unstyled.

    I really need to know what has gone wrong. Thanks.

    Posted 1 year ago #
  2. Please note that Thematic has moved to http://thematictheme.com

    In your functions.php you will want to enqueue your style as per the WordPress codex: http://codex.wordpress.org/Function_Reference/wp_enqueue_style

    Posted 1 year ago #
  3. logish
    Member

    Thanks Jagst3r15. I'm a complete beginner in using the functions.php for child themes. Could you show me how to use enqueue for the following:

    <?php

    function childtheme_create_stylesheet() {
    $templatedir = get_bloginfo('template_directory');
    $stylesheetdir = get_bloginfo('stylesheet_directory');
    ?>
    <link rel="stylesheet" type="text/css" href="<?php echo $templatedir ?>/library/styles/reset.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo $templatedir ?>/library/styles/typography.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo $templatedir ?>/library/styles/images.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo $templatedir ?>/library/layouts/2c-l-fixed.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo $templatedir ?>/library/styles/default.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo $stylesheetdir ?>/style.css" />

    <?php
    }
    add_filter('thematic_create_stylesheet', 'childtheme_create_stylesheet');

    ?>

    Posted 1 year ago #
  4. to repeat: thematic has moved to a new site and you should direct questions there. this particular question has already been answered in the new forums there b/c this method is outdated and was changed in the upgrade to thematic 1.0

    please also read the article i wrote that directly addresses this issue:
    http://thematictheme.com/2012/06/01/improved-script-style-loading-thematic-1-0/

    Posted 1 year ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.