blob: 0c47c52eaafc436ff4007283b6f5135ccf6a78d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);
|