Title: static page &#8211; programically
Last modified: August 20, 2016

---

# static page – programically

 *  [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * (@ukndoit)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/static-page-programically/)
 * I am trying to make a page s`tatic for a theme only, it is the theme loaded by
   the wordpress-mobile-pack
 * it is a mobile theme, I made a new version of the static page loaded on the home
   page of the main site, so that it is optimized for a mobile device…
 * in the mobile theme in the index.php file I made this hack, but I am sure there
   is a better way to do it:
 * where this is:
 *     ```
       if (isset($_GET['archives']) && ($archives = $_GET['archives'])!='') {
         $wpmp_title = __("Blog archives", 'wpmp');
         $wpmp_archives = true;
       } elseif (have_posts()) {
         $post = $posts[0];
   
         if (is_search()) {
       ```
   
 * I did this:
 *     ```
       if($_ENV["REQUEST_URI"] == "/") {
          query_posts('page_id=94');
       } elseif (isset($_GET['archives']) && ($archives = $_GET['archives'])!='') {
         $wpmp_title = __("Blog archives", 'wpmp');
         $wpmp_archives = true;
       } elseif (have_posts()) {
         $post = $posts[0];
   
         if (is_search()) {
       ```
   
 * so it now first checks the ENV to see if they loaded something beyond the domain
   name:
    $_ENV[“REQUEST_URI”] == “/”
 * if they loaded a page it would have /page=94 or whatever…
 * That does work, but is there a way to do it without doing it that way? A way 
   that wordpress designed it to work so it works according to their system?
 * Thanks,
    Richard

The topic ‘static page – programically’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [ukndoit](https://wordpress.org/support/users/ukndoit/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/static-page-programically/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
