Home>Support>Vantage Child Theme .css and function.php

Vantage Child Theme .css and function.php

By MJ, 9 years ago. Last reply by Andrew Misplon, 8 years ago.

Hi, I understand that I need to use a child theme ‘.css and function.php’ file in my ‘Vantage-child’ directory. I need to set up the function.php file correctly and I’m seeing through WordPress forums that I need to enqueue the style.css?

Does this look correct and will it align with the @import code given in the child style.css?

<?php

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

}

—end
Thanks!

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    Hi mjordan

    Here is a vanilla child theme ready to go:

    https://siteorigin.com/wp-content/uploads/2015/01/vantage-child-vanilla-enqueue.zip

    Check it out, it should answer your question.

  2. 9 years, 8 months ago MJ

    Thank you! I should see the child theme option in my dashboard? or does this an invisible function?

  3. 8 years, 2 months ago jetform

    @Andrew Misplon, Isn’t there a missing ?> in your functions.php at the end?

    • 8 years, 2 months ago Andrew Misplon
      Hi, I Work Here

      Hey jetform

      It’s correct without the closing tag. The reply here puts it better than I would :)

      Hope that helps :) If in doubt, you can also check out _s which is possibly the most vetted starter theme out there. Last line in functions.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More