Created
December 3, 2016 12:43
-
-
Save salma101234/bca237a8ce214b6d43b35eb7797353cb to your computer and use it in GitHub Desktop.
This file contains hidden or 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 language_attributes(); ?> | |
<?php bloginfo( 'charset' ); ?> | |
<?php wp_title('|',true,'right') ?> //--- set title($sep, $display,$location) | |
//add header within <head> tag | |
<?php wp_head() ?> | |
//add footer after finishing footer tag | |
<?php wp_footer() ?> | |
//create funcions.php file within theme folder | |
// default rules to write a function into functions.php | |
function my_function_name(){ | |
} | |
add_action('','my_function_name') | |
// create a function in functions.php to get all css and js files from the template | |
//example | |
function corlate_theme_files(){ | |
//include all css files | |
wp_register_style('bootstarp',get_template_directory_uri().'/css/bootstrap.min.css',array(), | |
'3.0.3','all'); //***********************<?php wp_register_style( $handle, $src, $deps, $ver, $media ); ?> | |
wp_register_style('font-awesome',get_template_directory_uri().'/css/font-awesome.min.css',array(),'1.0','all'); | |
wp_register_style('animate',get_template_directory_uri().'/css/animate.min.css',array(),'4.0.3','all'); | |
wp_register_style('prettyPhoto',get_template_directory_uri().'/css/prettyPhoto',array(),'3.1.5','all'); | |
wp_register_style('main',get_template_directory_uri().'/css/main.css',array(),'1.0','all'); | |
wp_register_style('responsive',get_template_directory_uri().'/css/responsive.css',array(),'1.0','all'); | |
wp_enqueue_style('bootstarp'); | |
wp_enqueue_style('font-awesome');//wp_enqueue_style($style_name); | |
wp_enqueue_style('animate'); | |
wp_enqueue_style('prettyPhoto'); | |
wp_enqueue_style('main'); | |
wp_enqueue_style('responsive'); | |
//include wordpress default jquery | |
wp_enqueue_script('jquery'); // jquery must be added before enque all scripts | |
//include all js | |
wp_enqueue_script('bootstarp-js',get_template_directory_uri().('/js/bootstrap.min.js'),array('jquery'),'3.0.3',true); | |
///<?php wp_register_style( $handle, $src, $deps, $ver, $in_footer ); ?> | |
wp_enqueue_script('prettyPhoto-js',get_template_directory_uri().('/js/jquery.prettyPhoto.js'),array('jquery'),'3.1.5',true); | |
wp_enqueue_script('isotope-js',get_template_directory_uri().('/js/jquery.isotope.min.js'),array('jquery'),'1.5.25',true); | |
wp_enqueue_script('main-js',get_template_directory_uri().('/js/main.js'),array('jquery'),'1.0',true); | |
wp_enqueue_script('wow-js',get_template_directory_uri().('/js/wow.min.js'),array('jquery'),'1.0',true); | |
} | |
add_action('wp_enqueue_scripts','corlate_theme_files') | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment