diff options
Diffstat (limited to 'plugins/wordpress-mobile-pack/frontend/themes/app2/category.php')
-rwxr-xr-x | plugins/wordpress-mobile-pack/frontend/themes/app2/category.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/wordpress-mobile-pack/frontend/themes/app2/category.php b/plugins/wordpress-mobile-pack/frontend/themes/app2/category.php new file mode 100755 index 00000000..064c6791 --- /dev/null +++ b/plugins/wordpress-mobile-pack/frontend/themes/app2/category.php @@ -0,0 +1,15 @@ +<?php + +$category_name = single_cat_title("", false); +$mobile_url = home_url(); + +if ($category_name){ + + $category_obj = get_term_by('name', $category_name, 'category'); + + if ($category_obj && isset($category_obj->slug) && isset($category_obj->term_id) && is_numeric($category_obj->term_id)){ + $mobile_url .= "/#category/".$category_obj->slug.'/'.$category_obj->term_id; + } +} + +header("Location: ".$mobile_url); |