• Hey All,

    So I tried to help a friend set up a child theme last night on Tisson, and noticed that wordpress now recommends using functions.php instead of the @import method for styles. Unfortunately I suck horribly at php…and something isn’t working quite right- every page shows in the menu. What the proper way to set this up for the theme?

    Here’s my php:

    <?php
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ’tisson’, get_template_directory_uri() . ‘/style.css’ );

    }
    ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • Have you asked the developers of the theme? They’d be the best ones to help with a theme-specific issue since people here don’t have access to commercial themes.

    http://codex.wordpress.org/Forum_Welcome#Commercial_Products

    Thread Starter fechto

    (@fechto)

    Thanks. They don’t support customizations, and besides, you have to have an account to log in and post (the person I’m helping out probably does have an account; they have no idea what the login details would be). But I don’t really need that. What I do need is a method to get all the styles in there. There is line if the codex:

    If your theme has more than one .css file (eg. ie.css, style.css, main.css) then you will have to make sure to maintain all of the Parent Theme dependencies.

    And there are about 7 different css stylesheets in there. i see that the example code in functions.php only calls style.css (which isn’t even a file in that theme).

    So what I’m looking for is some example code on how to load multiple css files (remember my coding handicap). If the files were say main.css, responsive.css and index.css how would you add those to functions.php?

    May i ask for the complete code for functions.php? Including opening and closing tags?

    And if my knowledge seems to advanced… i know html and css as well as anyone, but make rookie mistakes with pretty well anything programming wise that isn’t copy and paste.

    Thanks!

    Aaron

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Don’t worry about it then, just do the @import line(s) in your Child Theme style.css file. It’s not a big deal either way.

    Thread Starter fechto

    (@fechto)

    fair enough, I can do that. If someone does post it I would appreciate though.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Is CSS specificity causing you an issue though?

    Thread Starter fechto

    (@fechto)

    no. Just want to do it the recommended way. Every other child theme I’ve ever build uses the @import method…though I’ve never had more than one file. I assume is just a new @import command per line until they are all in there.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Tisson Theme- Child Theme With Functions.php’ is closed to new replies.