Title: 2is3's Replies | WordPress.org

---

# 2is3

  [  ](https://wordpress.org/support/users/2is3/)

 *   [Profile](https://wordpress.org/support/users/2is3/)
 *   [Topics Started](https://wordpress.org/support/users/2is3/topics/)
 *   [Replies Created](https://wordpress.org/support/users/2is3/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/2is3/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/2is3/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/2is3/engagements/)
 *   [Favorites](https://wordpress.org/support/users/2is3/favorites/)

 Search replies:

## Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [301 home redirection to newly created page](https://wordpress.org/support/topic/301-home-redirection-to-newly-created-page/)
 *  [2is3](https://wordpress.org/support/users/2is3/)
 * (@2is3)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/301-home-redirection-to-newly-created-page/#post-1552789)
 * <strike>**Update:** If you go to ‘Tools > Redirection > Modules’ and completely
   delete that WordPress module, it seems to fix the bug.</strike>
 * Nevermind, that didn’t work really. Now you can’t create redirects… bah!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [301 home redirection to newly created page](https://wordpress.org/support/topic/301-home-redirection-to-newly-created-page/)
 *  [2is3](https://wordpress.org/support/users/2is3/)
 * (@2is3)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/301-home-redirection-to-newly-created-page/#post-1552788)
 * Yup, I’m having the same issue on a couple of sites I work with. Anytime a new
   page or new custom post type is created (does not occur with new **posts**).
 * A new row is added to the wp_redirection_items table where the ‘URL’ is ‘/’ and
   the ‘action data’ is the slug to the new page.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to get grandparent page in classes.php?](https://wordpress.org/support/topic/how-to-get-grandparent-page-in-classesphp/)
 *  [2is3](https://wordpress.org/support/users/2is3/)
 * (@2is3)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/how-to-get-grandparent-page-in-classesphp/#post-800807)
 * Also, you can get the Root parent by adding this snippet to your functions.php:
 *     ```
       function get_root_parent($page_id) {
       global $wpdb;
       	$parent = $wpdb->get_var("SELECT post_parent FROM $wpdb->posts WHERE post_type='page' AND ID = '$page_id'");
       	if ($parent == 0) return $page_id;
       	else return get_root_parent($parent);
       }
       ```
   
 * then use this in your template:
 * `$root_parent = get_root_parent($post->ID);`
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to get grandparent page in classes.php?](https://wordpress.org/support/topic/how-to-get-grandparent-page-in-classesphp/)
 *  [2is3](https://wordpress.org/support/users/2is3/)
 * (@2is3)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/how-to-get-grandparent-page-in-classesphp/#post-800806)
 * adding a get_post() seems to make it work:
 *     ```
       <?php
       $current = $post->ID;
       $parent = $post->post_parent;
       $grandparent_get = get_post($parent);
       $grandparent = $grandparent_get->post_parent;
   
       echo 'current: '.$current.'<br />';
       echo 'parent: '.$parent.'<br />';
       echo 'grandparent: '.$grandparent;
       ?>
       ```
   
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Styling the nextpage tags](https://wordpress.org/support/topic/styling-the-nextpage-tags/)
 *  [2is3](https://wordpress.org/support/users/2is3/)
 * (@2is3)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/styling-the-nextpage-tags/#post-662885)
 * I totally know what you mean robertm, I would like to see a way to class the 
   current page number. I mean heck, even these forums do it:
 * View screen grab: [http://www.flickr.com/photos/2is3/2984968936/](http://www.flickr.com/photos/2is3/2984968936/)
 *     ```
       <p id="pages"><span class='page-numbers current'>1</span>
       <a class='page-numbers' href='/support/forum/3/page/2'>2</a>
       <a class='page-numbers' href='/support/forum/3/page/3'>3</a>
       <span class='page-numbers dots'>...</span>
       <a class='page-numbers' href='/support/forum/3/page/3298'>3298</a>
       <a class='next page-numbers' href='/support/forum/3/page/2'>Next &raquo;</a>
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)