質問編集履歴

2

kei344 さま。投稿方法について教えてくださってありがとうございます。bxsliderの記述は誤入力でした。bxsliderについての記述はどこにもございません

2016/05/01 16:23

投稿

yomomimi104snow
yomomimi104snow

スコア16

test CHANGED
File without changes
test CHANGED
@@ -28,9 +28,11 @@
28
28
 
29
29
  ###該当のソースコード
30
30
 
31
- ```ここに言語を入力
31
+
32
32
 
33
33
  footer.phpの</body>の前にカプセル化したjQueryの記述をした。
34
+
35
+ ```jquery
34
36
 
35
37
  <script type="text/javascript">
36
38
 
@@ -70,6 +72,8 @@
70
72
 
71
73
  </script>
72
74
 
75
+
76
+
73
77
  ```
74
78
 
75
79
 
@@ -78,23 +82,7 @@
78
82
 
79
83
  当初Wordpress内のjQueryを使って動作させるようにしていたのですが、エラーが出ていたので、WordPress本体とは違うバージョンのjQueryを指定するため、以下の記述をfunctions.phpに加えた。
80
84
 
81
- function my_scripts_method() {
82
-
83
- wp_deregister_script('jquery');
84
-
85
- wp_enqueue_script('jquery','https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', array(), '1.11.3');
86
-
87
- wp_enqueue_script('bxSlider', get_settings('site_url').'/wp-content/themes/your-theme/js/jquery.bxslider.min.js', array('jquery'), '4.1.2', true);
88
-
89
- }
90
-
91
- add_action( 'wp_enqueue_scripts', 'my_scripts_method' );
92
-
93
-
94
-
95
- ###補足情報(言語/FW/ツール等のバージョンなど)
96
-
97
- functions.php載した内容もあわせて下に記させていただきます
85
+ ```phpいたます
98
86
 
99
87
  <?php
100
88
 
@@ -104,7 +92,7 @@
104
92
 
105
93
  wp_enqueue_script('jquery','https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js', array(), '1.12.2');
106
94
 
107
- wp_enqueue_script('slick', get_settings('site_url').'/wp-content/themes/newworld/js/slick.min.js', array('jquery'), '1.5.9', true);
95
+ wp_enqueue_script('slick', get_settings('site_url').'/wp-content/themes/theme_name/js/slick.min.js', array('jquery'), '1.5.9', true);
108
96
 
109
97
  }
110
98
 
@@ -114,9 +102,17 @@
114
102
 
115
103
  ?>
116
104
 
105
+ ```
106
+
107
+
108
+
109
+ ###補足情報(言語/FW/ツール等のバージョンなど)
110
+
117
- 追記: header.phpの<head></head>の中の部分を記載します。
111
+ header.phpの<head></head>の中の部分を記載します。
118
112
 
119
113
  あわせてご覧いただければ幸いです。
114
+
115
+ ```html,php
120
116
 
121
117
  <head>
122
118
 
@@ -147,3 +143,5 @@
147
143
  <?php wp_head(); ?>
148
144
 
149
145
  </head>
146
+
147
+ ```

1

header\.php内<head></head>の部分を追記しました

2016/05/01 16:23

投稿

yomomimi104snow
yomomimi104snow

スコア16

test CHANGED
File without changes
test CHANGED
@@ -113,3 +113,37 @@
113
113
  add_theme_support('post-thumbnails');
114
114
 
115
115
  ?>
116
+
117
+ 追記: header.phpの<head></head>の中の部分を記載します。
118
+
119
+ あわせてご覧いただければ幸いです。
120
+
121
+ <head>
122
+
123
+ <meta charset="utf-8">
124
+
125
+ <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
126
+
127
+ <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSSフィード" href="<?php bloginfo('rss2_url'); ?>">
128
+
129
+ <meta name="viewport" content="width=device-width,initial-scale=1">
130
+
131
+ <!-- External files -->
132
+
133
+ <link href="<?php echo get_stylesheet_uri(); ?>" rel="stylesheet" type="text/css">
134
+
135
+ <link href="<?php echo get_template_directory_uri(); ?>/css/slick.css" type="text/css" media="screen">
136
+
137
+ <link href="<?php echo get_template_directory_uri(); ?>/css/slick-theme.css" type="text/css" media="screen">
138
+
139
+ <!-- Favicon, Thumbnail image -->
140
+
141
+ <link rel="shortcut icon" href="<?php bloginfo('template_url'); ?>/images/favicon.ico">
142
+
143
+ <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
144
+
145
+
146
+
147
+ <?php wp_head(); ?>
148
+
149
+ </head>