Title: Mobile version
Last modified: August 21, 2016

---

# Mobile version

 *  [Piotr Po](https://wordpress.org/support/users/potreb/)
 * (@potreb)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/mobile-version-13/)
 * Welcome. I wanted to create a mobile version of my template, but not a responsive.
   My idea was to just add a ‘mobile’ prefix before each link (permalink, page, 
   author, category).
 * How can I add this prefix to each link?
 * My first function was failed, becouse I changed all link on whole site, not onlu
   mobile version:
 *     ```
       function mobile_rewrite_permalinks() {
       				global $wp_rewrite;
       				add_rewrite_rule('^mobile','index.php','top');
       				$wp_rewrite->authorbase = 'mobile/author';
       				$wp_rewrite->category_base  = 'mobile/category';
       				$wp_rewrite->search_base = 'mobile/search';
       				$wp_rewrite->pagination_base = 'mobile/page';
       				$wp_rewrite->feed_base = 'mobile/feed';
       				$wp_rewrite->comments_base = 'mobile/comments';
       				$wp_rewrite->page_structure = 'mobile/%pagename%';
       				$wp_rewrite->date_structure = 'mobile/%year%/%monthnum%/%day%';
       				$wp_rewrite->permalink_structure = 'mobile/%postname%';
       				$wp_rewrite->root = 'mobile/';
       				$wp_rewrite->flush_rules();
       			}
       			add_action('init','mobile_rewrite_permalinks');
       ```
   

The topic ‘Mobile version’ is closed to new replies.

## Tags

 * [mobile](https://wordpress.org/support/topic-tag/mobile/)

 * 0 replies
 * 1 participant
 * Last reply from: [Piotr Po](https://wordpress.org/support/users/potreb/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/mobile-version-13/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
