質問編集履歴

4

修正

2020/01/11 01:24

投稿

asti
asti

スコア6

test CHANGED
File without changes
test CHANGED
@@ -64,9 +64,13 @@
64
64
 
65
65
  foreach ($products_cats as $products_cat) {
66
66
 
67
+
68
+
67
69
  $term_slug = get_query_var($products_cat);
68
70
 
69
71
  $taxonomy_var = get_taxonomy($products_cat);
72
+
73
+
70
74
 
71
75
  wp_dropdown_categories(array(
72
76
 

3

編集

2020/01/11 01:24

投稿

asti
asti

スコア6

test CHANGED
File without changes
test CHANGED
@@ -12,9 +12,9 @@
12
12
 
13
13
 
14
14
 
15
- $term_slug = get_query_var( 'products_cat' );
15
+ $term_slug = get_query_var('products_cat');
16
16
 
17
- $taxonomy_var = get_taxonomy($products_cat);
17
+ $taxonomy_var = get_taxonomy('products_cat');
18
18
 
19
19
 
20
20
 

2

修正

2020/01/11 01:23

投稿

asti
asti

スコア6

test CHANGED
File without changes
test CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  wp_dropdown_categories( array(
22
22
 
23
- 'show_option_all' => __( 'All Tracks', 'my_theme' ),
23
+ 'show_option_all' => $taxonomy_var->label,
24
24
 
25
25
  'selected' => $term_slug,
26
26
 

1

修正

2020/01/11 01:22

投稿

asti
asti

スコア6

test CHANGED
File without changes
test CHANGED
@@ -72,7 +72,7 @@
72
72
 
73
73
  'show_option_all' => $taxonomy_var->label,
74
74
 
75
- 'selected' => $taxonomy_var->slug,
75
+ 'selected' => $term_slug,
76
76
 
77
77
  'name' => $products_cat,
78
78