Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. function enqueue_jquery() {
  2. // retira o jquery padrão do wordpress, ok retirou
  3. wp_deregister_script('jquery');
  4.  
  5. // Não esta adicionando este jquery, que é o que preciso, no código
  6. wp_enqueue_script(
  7. 'jquery',
  8. get_template_directory_uri() . '/js/jquery.js',
  9. array(), // don't make jquery dependent on jquery...!
  10. '1.11.1',
  11. true
  12. );
  13.  
  14. }
  15. add_action('wp_enqueue_scripts', 'enqueue_jquery');
  16.  
  17. function enqueue_styles_scripts() {
  18.  
  19. //OK adicionou normal
  20. wp_enqueue_style(
  21. 'style-theme',
  22. get_stylesheet_uri(),
  23. array('bootstrap-css')
  24. );
  25.  
  26. //OK adicionou normal
  27. wp_enqueue_style(
  28. 'bootstrap-css',
  29. get_template_directory_uri() . '/css/bootstrap.min.css'
  30. );
  31.  
  32. //OK adicionou normal
  33. wp_enqueue_style(
  34. 'stylish-portfolio',
  35. get_template_directory_uri() . '/css/othercss.css'
  36. );
  37.  
  38. //OK adicionou normal
  39. wp_enqueue_style(
  40. 'font-awesome',
  41. get_stylesheet_directory_uri() . '/css/font-awesome.css'
  42.  
  43. );
  44.  
  45.  
  46. //Adicionou normal, mas como depende do jquery não esta funcionando
  47. wp_enqueue_script(
  48. 'bootstrap-js',
  49. get_template_directory_uri() . '/js/bootstrap.min.js',null
  50. );
  51.  
  52.  
  53. }
  54. add_action('wp_enqueue_scripts', 'enqueue_styles_scripts');
  55.  
  56.  
  57. //ok adicionou normal
  58. function wpse_ie_conditional_scripts() { ?>
  59. <!--[if lt IE 9]>
  60. <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  61. <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  62. <![endif]-->
  63. <?php
  64. }
  65. add_action( 'wp_head', 'wpse_ie_conditional_scripts' );
  66.  
  67. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement