Advertisement
firoze

Enqueue Styles & Scripts & jaquery & masonry enable

Dec 18th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. // Set up the content width value based on the theme's design and stylesheet.
  2. if ( ! isset( $content_width ) )
  3. $content_width = 625;
  4.  
  5. // for javascript jaquery enable into the site from wordpress
  6. function my_scripts_method_tshirt() {
  7. wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', '1.0');
  8. wp_enqueue_script( 'jquery' );
  9. // wp_enqueue_script( 'jquery-masonry', array( 'jquery' ), '20140711', true );
  10. }
  11.  
  12. add_action('wp_enqueue_scripts', 'my_scripts_method_tshirt');
  13.  
  14. // Registered Enqueue Styles & Scripts
  15. function mostra_scripts_styles() {
  16. global $wp_styles;
  17. /*
  18. * Adds JavaScript to pages with the comment form to support
  19. * sites with threaded comments (when in use).
  20. */
  21. if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
  22. wp_enqueue_script( 'comment-reply' );
  23. /**********************************************************************************************/
  24. //Registering styles
  25. wp_register_style( 'search-form-css', get_template_directory_uri() .'/css/css/search-form.css', array( '' ), '1.0.0', true );
  26. wp_register_style( 'comments-css', get_template_directory_uri() .'/css/comments.css', array( '' ), '1.0.0', true );
  27. /**********************************************************************************************/
  28. // Enqueue styles
  29. wp_enqueue_style( 'search-form-css', get_stylesheet_uri(), array( '' ), '1.0.0', true );
  30. wp_enqueue_style( 'comments-css', get_stylesheet_uri(), array( '' ), '1.0.0', true );
  31.  
  32. /**********************************************************************************************/
  33. // Loads our main stylesheet.
  34. wp_enqueue_style( 'mostra-style', get_stylesheet_uri() );
  35. /**********************************************************************************************/
  36. // Registered Enqueue Scripts
  37. wp_enqueue_script( 'mixitup-min-js', get_template_directory_uri() . '/js/jquery.mixitup.min.js', array( 'jquery' ), '20140711', true );
  38. wp_enqueue_script( 'main-js', get_template_directory_uri() . '/js/main.js', array( 'jquery' ), '20140711', true );
  39. /**********************************************************************************************/
  40.  
  41. }
  42. add_action( 'wp_enqueue_scripts', 'mostra_scripts_styles' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement