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) {
1010
1111 if ( '/ ' . $ keyword == $ url )
1212
13- return array ('id ' => $ category ->term_id , 'type ' => $ category ->taxonomy );
13+ return array ('id ' => $ category ->term_id , 'slug ' => $ category -> slug , ' type ' => $ category ->taxonomy );
1414 }
1515 return false ;
1616 }
@@ -31,12 +31,14 @@ public function searchKeyword($url) {
3131 if ($ search ) {
3232 if ($ search ['type ' ] == 'category ' ) {
3333 $ type = 'blog-category ' ;
34+ $ search = $ search ['id ' ];
3435 } else if ($ search ['type ' ] == 'pwb-brand ' ) {
3536 $ type = 'manufacturer ' ;
37+ $ search = $ search ['slug ' ];
3638 } else {
3739 $ type ='category ' ;
40+ $ search = $ search ['id ' ];
3841 }
39- $ search = $ search ['id ' ];
4042 } else {
4143 $ search = '' ;
4244 }
You can’t perform that action at this time.
0 commit comments