Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // wp enqueue
- // for javascript jaquery enable into the site from wordpress
- function my_script() {
- // for main jquery
- wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', '1.0');
- wp_enqueue_script( 'jquery' );
- // masonry
- wp_enqueue_script('jquery-masonry',array('jquery'));
- }
- add_action('init', 'my_script');
- // this is others en queue
- function various_my_various_styles(){
- global $wp_styles;
- /*
- * Adds JavaScript to pages with the comment form to support
- * sites with threaded comments (when in use).
- */
- if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
- wp_enqueue_script( 'comment-reply' );
- /*Register styles*/
- // bootstrap min css
- wp_register_style( 'bootstrap-min-css', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '1','all' );
- // bootstrap theme min css
- wp_register_style( 'bootstrap-theme-min-css', get_template_directory_uri() . '/css/bootstrap-theme.min.css', array(), '1','all' );
- // prettyPhoto min css
- wp_register_style( 'prettyPhoto-min-css', get_template_directory_uri() . '/css/prettyPhoto.min.css', array(), '1','all' );
- // meanmenu min css
- wp_register_style( 'meanmenu-min-css', get_template_directory_uri() . '/css/meanmenu.min.css', array(), '1','all' );
- // responsive css
- wp_register_style( 'responsive-css', get_template_directory_uri() . '/responsive.css', array(), '1','all' );
- /*Enqueue styles*/
- // bootstrap min css
- wp_enqueue_style( 'bootstrap-min-css', get_stylesheet_uri(), array( ),'1','all' );
- // bootstrap theme min css
- wp_enqueue_style( 'bootstrap-theme-min-css', get_stylesheet_uri(), array( ),'1','all' );
- // prettyPhoto min css
- wp_enqueue_style( 'prettyPhoto-min-css', get_stylesheet_uri(), array( ),'1','all' );
- // meanmenu min css
- wp_enqueue_style( 'meanmenu-min-css', get_stylesheet_uri(), array( ),'1','all' );
- // responsive css
- wp_enqueue_style( 'responsive-css', get_stylesheet_uri(), array( ),'1','all' );
- /* this is the main style css*/
- wp_enqueue_style( 'verious-codes-style', get_stylesheet_uri() );
- // Loading all javascript file here
- // mixitup
- wp_enqueue_script( 'jquery-mixitup-min-js', get_template_directory_uri('jquery') . '/js/jquery.mixitup.min.js', array(), '1','0', true );
- // prettyPhoto
- wp_enqueue_script( 'jquery-prettyPhoto-min-js', get_template_directory_uri('jquery') . '/js/jquery.prettyPhoto.min.js', array(), '1','0', true );
- // jflickrfeed
- wp_enqueue_script( 'jquery-jflickrfeed-min-js', get_template_directory_uri('jquery') . '/js/jflickrfeed.min.js', array(), '1','0', true );
- // jribbble
- wp_enqueue_script( 'jquery-jribbble-min-js', get_template_directory_uri('jquery') . '/js/jquery.jribbble-1.0.1.min.js', array(), '1','0', true );
- // bootstrap-min
- wp_enqueue_script( 'bootstrap-min-js', get_template_directory_uri('jquery') . '/js/bootstrap.min.js', array(), '1','0', true );
- // main js
- wp_enqueue_script( 'main-js', get_template_directory_uri('jquery') . '/js/main.js', array(), '1','0', true );
- }
- add_action('wp_enqueue_scripts','various_my_various_styles');
- // html5shiv & respond js IE
- function my_ie_support_header() {
- echo '<!--[if lt IE 9]>'. "\n";
- echo '<script src="' . esc_url( get_template_directory_uri() . '/js/html5shiv.js' ) . '"></script>'. "\n";
- echo '<script src="' . esc_url( get_template_directory_uri() . '/js/respond.min.js' ) . '"></script>'. "\n";
- echo '<![endif]-->'. "\n";
- }
- add_action( 'wp_head', 'my_ie_support_header' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement