File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ public function get_category_by_url($url) {
10
10
11
11
if ( '/ ' . $ keyword == $ url )
12
12
13
- return array ('id ' => $ category ->term_id , 'type ' => $ category ->taxonomy );
13
+ return array ('id ' => $ category ->term_id , 'slug ' => $ category -> slug , ' type ' => $ category ->taxonomy );
14
14
}
15
15
return false ;
16
16
}
@@ -31,12 +31,14 @@ public function searchKeyword($url) {
31
31
if ($ search ) {
32
32
if ($ search ['type ' ] == 'category ' ) {
33
33
$ type = 'blog-category ' ;
34
+ $ search = $ search ['id ' ];
34
35
} else if ($ search ['type ' ] == 'pwb-brand ' ) {
35
36
$ type = 'manufacturer ' ;
37
+ $ search = $ search ['slug ' ];
36
38
} else {
37
39
$ type ='category ' ;
40
+ $ search = $ search ['id ' ];
38
41
}
39
- $ search = $ search ['id ' ];
40
42
} else {
41
43
$ search = '' ;
42
44
}
You can’t perform that action at this time.
0 commit comments