for Windows
By Raymon Schouwenaar
Read more about the Vagrant CLI
These files are a very minimal
functions.php | All the php functions for the theme |
header.php | All the head information and header of the website |
index.php | The base page of a post or page layout |
footer.php | Footer of the website |
single.php | Layout of a post or post-type |
page.php | Layout for a page or page-type |
style.css | The default CSS and Theme name + descr. |
screenshot.png | A screenshot of a theme |
These files are a very minimal
404.php | Layout for 404 page |
archive.php | Layout for archive (category/tag) page |
sidebar | Layout for sidebar and widgets |
comments.php | Template for comments |
Resources:
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
Always include these in the
<?php get_header(); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Always include these in the
<?php wp_footer(); ?>
Always include these in the
function twentysixteen_stylesheets() {
// Add custom stylesheet
wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css');
// Add Theme stylesheet. (style.css)
wp_enqueue_style( 'twentysixteen-style', get_stylesheet_uri() );
}
add_action( 'wp_head', 'twentysixteen_stylesheets');
In the
function twentysixteen_scripts() {
// Add javascript
wp_enqueue_script( 'javascript-name', get_template_directory_uri() . '/js/html5.js');
}
add_action( 'wp_head', 'twentysixteen_scripts');
In the
function example_function() {
// Add javascript
wp_enqueue_script( 'javascript-name', get_template_directory_uri() . '/js/html5.js');
}
add_action( 'wp_head', 'example_function');
add_action( 'wp_footer', 'example_function');
add_action( 'admin_menu', 'example_function' );
add_filter( 'excerpt_length', 'example_function' );
In the
Read more about WordPress actions & filters
Check the example for GruntJS
Check the example for GulpJS