Last active
November 29, 2016 23:45
-
-
Save mostafa6765/e452224b89542171ad6092717699f80c to your computer and use it in GitHub Desktop.
Wordpress Theme basic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Proper way to enqueue scripts and styles | |
*/ | |
function wp_friend_scripts() { | |
wp_enqueue_style( 'style-name', get_stylesheet_uri() . '/css/main_style.css', array(),'',false ); | |
wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/example.js', array(), '1.0.0', true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'wp_friend_scripts' ); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html <?php language_attributes(); ?> class="no-js"> | |
<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"> | |
<?php wp_head(); ?> | |
</head> | |
<body <?php body_class(); ?>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment