質問編集履歴
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,3 +28,28 @@
|
|
28
28
|
</ul>
|
29
29
|
```
|
30
30
|
|
31
|
+
【変更後】
|
32
|
+
```PHP
|
33
|
+
<ul>
|
34
|
+
<?php
|
35
|
+
$args02 = array(
|
36
|
+
'posts_per_page' => -1,
|
37
|
+
'post_type' => 'contact',
|
38
|
+
|
39
|
+
'tax_query' => array(
|
40
|
+
array(
|
41
|
+
'taxonomy' => 'select_shops',
|
42
|
+
'field' => 'slug',
|
43
|
+
'terms' => array( 'kashiwa02' )
|
44
|
+
),
|
45
|
+
)
|
46
|
+
);
|
47
|
+
?>
|
48
|
+
|
49
|
+
<?php foreach ( get_posts( $args02 ) as $post): setup_postdata($post); ?>
|
50
|
+
<li><a href="<?php $post_id = the_ID(); wp_delete_post($post_id); ?>" onclick="return confirm('削除します。宜しいですか?')"><?php the_title(); ?></a></li>
|
51
|
+
<?php endforeach; ?>
|
52
|
+
|
53
|
+
</ul>
|
54
|
+
```
|
55
|
+
|