Home › Forums › Support › How to display the featured image of a parent page in all child pages? This topic has 1 reply, 2 voices, and was last updated 5 years ago by Tom. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts March 31, 2019 at 7:20 am #855037 shpr Hello, can you tell me how I would do this in GeneratePress? I tried placing this code in functions.php (in a child theme) without any luck. function get_parent_post_thumb($post){ if ( $post->post_parent ) { $parentId = end($post->ancestors); the_post_thumbnail($parentId); } else { the_post_thumbnail($post->ID); } } Code source: https://www.isitwp.com/get-parent-featured-image-in-children-subpage/ Thanks March 31, 2019 at 4:28 pm #855296 TomLead Developer Lead Developer Hi there, Did you use the get_parent_post_thumb() function anywhere on your site? Maybe in a Hook Element? It looks like that function actually outputs an image, so it needs to be placed where you want the image to be. Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In