/ Published in: PHP
                    
                                        Returns the page object of the parent of the current page.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
 function get_parent_page() { global $post; $topParent = $post; while ($topParent->post_parent) { $topParent = $topParent->post_parent; } return get_page($topParent); }
Comments
                    Subscribe to comments
                
                