質問編集履歴
1
PHP書き換え
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,12 +46,6 @@
|
|
46
46
|
|
47
47
|
```PHP
|
48
48
|
|
49
|
-
<?php
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
49
|
get_header(); ?>
|
56
50
|
|
57
51
|
|
@@ -64,160 +58,144 @@
|
|
64
58
|
|
65
59
|
|
66
60
|
|
67
|
-
<?php
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
i
|
102
|
-
|
103
|
-
<
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
$txt
|
130
|
-
|
131
|
-
i
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
<
|
156
|
-
|
157
|
-
<
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
<?ph
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
<?php
|
200
|
-
|
201
|
-
$txt = get_field('variation_off');
|
202
|
-
|
203
|
-
$select = get_field('sell');
|
204
|
-
|
205
|
-
if($txt){ ?>
|
206
|
-
|
207
|
-
<a href="https://hogehoge.com/productid=
|
208
|
-
|
209
|
-
<? echo $txt; ?>
|
210
|
-
|
211
|
-
"><img src="http://hogehogepress.com/2015/09/<? echo $select ; ?>.png"></a>
|
212
|
-
|
213
|
-
<? }
|
214
|
-
|
215
|
-
?>
|
216
|
-
|
217
|
-
</div>
|
61
|
+
<?php
|
62
|
+
|
63
|
+
$txt = get_field('product_name');
|
64
|
+
|
65
|
+
if($txt){ ?> <h1 class="entry-title"> <?php echo $txt; ?> </h1>
|
66
|
+
|
67
|
+
<? }
|
68
|
+
|
69
|
+
?>
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div class="entry-content">
|
74
|
+
|
75
|
+
<?php
|
76
|
+
|
77
|
+
$txt = get_field('product_image');
|
78
|
+
|
79
|
+
if($txt){ ?>
|
80
|
+
|
81
|
+
<?php
|
82
|
+
|
83
|
+
if ( function_exists( 'soliloquy' ) ) { soliloquy($txt); }
|
84
|
+
|
85
|
+
} ?>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<?php
|
90
|
+
|
91
|
+
$txt = get_field('product_text');
|
92
|
+
|
93
|
+
if($txt){ ?>
|
94
|
+
|
95
|
+
<div style="word-wrap:break-word";>
|
96
|
+
|
97
|
+
<h4><? echo $txt; ?></h4></div>
|
98
|
+
|
99
|
+
<? }
|
100
|
+
|
101
|
+
?>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
<?php
|
106
|
+
|
107
|
+
$txt = get_field('product_spec');
|
108
|
+
|
109
|
+
if($txt){ ?>
|
110
|
+
|
111
|
+
<p><? echo $txt; ?></p>
|
112
|
+
|
113
|
+
<? }
|
114
|
+
|
115
|
+
?>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
<?php
|
120
|
+
|
121
|
+
$txt = get_field('price');
|
122
|
+
|
123
|
+
if($txt){ ?>
|
124
|
+
|
125
|
+
<span style="font-size:40px; color:#FF0000;"> <? echo $txt; ?></span>
|
126
|
+
|
127
|
+
<? }
|
128
|
+
|
129
|
+
?>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<span style="color: #ee0000;">
|
134
|
+
|
135
|
+
(税込)
|
136
|
+
|
137
|
+
</span>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<?php
|
142
|
+
|
143
|
+
$radio = get_field('size_color');
|
144
|
+
|
145
|
+
if(get_field(' size_color ') == "enable"){?>
|
146
|
+
|
147
|
+
<form>
|
148
|
+
|
149
|
+
<div class="sel" style="text-align: center; margin-top:10px;">
|
150
|
+
|
151
|
+
<select name="select2">
|
152
|
+
|
153
|
+
<?php
|
154
|
+
|
155
|
+
$txt = get_field('size_color_input');
|
156
|
+
|
157
|
+
if($txt){ echo $txt; }?>
|
158
|
+
|
159
|
+
<? echo $txt; ?>
|
160
|
+
|
161
|
+
</select>
|
162
|
+
|
163
|
+
<?php
|
164
|
+
|
165
|
+
$select = get_field('sell');
|
166
|
+
|
167
|
+
if($select){?>
|
168
|
+
|
169
|
+
<input class="<? echo $select; ?>" type="button" value="" onclick="top.location.href=select2.value">
|
170
|
+
|
171
|
+
}
|
172
|
+
|
173
|
+
}
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<?php
|
178
|
+
|
179
|
+
if(get_field(' size_color ') == "disable"){?>
|
180
|
+
|
181
|
+
<?php
|
182
|
+
|
183
|
+
$txt = get_field('variation_off');
|
184
|
+
|
185
|
+
if($txt){ echo $txt; }
|
186
|
+
|
187
|
+
$select = get_field('sell');
|
188
|
+
|
189
|
+
if($select){ echo $select; }?>
|
190
|
+
|
191
|
+
<a href="https://hoge.com/p_id=<? echo $txt; ?>" class="<? echo $select; ?>">
|
218
192
|
|
219
193
|
<?php endwhile; ?>
|
220
194
|
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
221
199
|
</div><!-- #content -->
|
222
200
|
|
223
201
|
</div><!-- #primary -->
|
@@ -270,6 +248,10 @@
|
|
270
248
|
|
271
249
|
|
272
250
|
|
251
|
+
$radioの前までですとしっかりと表示されます。しかし、
|
252
|
+
|
273
253
|
こちらですと、endwhileの部分でエラーが出てしまい、動作確認もできず...
|
274
254
|
|
255
|
+
おそらく$radio以降、書き方が間違えているのではないかと思っています。
|
256
|
+
|
275
257
|
お恥ずかしい話なのですが、どこが間違えているか、ご教示いただければと思います。
|