Snippets

Jan Pozivil WP Child Theme Starter Kit

Created by Jan Pozivil last modified
<?php
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function my_theme_enqueue_styles() {
  //Load Styles
  $parent_style = 'parent-style'; // This is 'twentysixteen-style' for the Twenty Sixteen theme.
  wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); // load parent template stylesheet
  wp_enqueue_style( 'wpb-google-fonts', 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,700,300italic,700italic', false ); // preffered way of loading Google fonts
  wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style, 'wpb-google-fonts' ), wp_get_theme()->get('Version') ); // load child theme's stylesheet

  // Load JS
  wp_register_script('child-js', get_stylesheet_directory_uri() . '/_/js/functions.js', array('jquery'), false, true );
  wp_enqueue_script('child-js');
}
?>
jQuery.noConflict();
var Modul = (function($, w) //shortcuts $=jQuery, w=window
{
  var APP = {
    init: function()
    {
      //start methods within APP
    }
  };
  $(document).ready(function()
  {
    APP.init();
  });
})(jQuery, window, undefined);
/*
 Theme Name:   Artists Network Alpujarra theme
 Theme URI:    http://example.com/twenty-fifteen-child/
 Description:  Twenty Sixteen Child Theme
 Author:       Jan Pozivil
 Author URI:   http://www.planXdesign.eu
 Template:     twentysixteen
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  anaV1
*/

// Import partials as necessary
// @import 'variables';
// @import 'general';
// @import 'header';
// @import 'menus';
// @import 'footer';

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.