You’re not inside a regular loop, or at least not one where global post variables are set, so the_post_thumbnail
does not have an ID to fetch a thumbnail for..
Use get_the_post_thumbnai( $page->ID )
instead and it should work fine.
Related Posts:
- featured image as background image on pages
- How do I use featured images on index.php?
- Only Display a Featured Image on First Post Page
- Outputting content from page
- Featured Image not displaying in a page
- How do you add a featured image to a page (not post)?
- How to get current page ID outside the loop?
- How to give paged links custom title?
- Show Default Editor on Blog Page ( Administration Panel )
- Create pages automatically if they don’t exist
- Can I display submenus in groups, using wp_list_pages?
- Order by menu_order and title?
- Can I display the widget admin in the page admin?
- Internal Links to Pages in PHP?
- How to inject custom url path for page ?
- Restrict acceess of a page in backend
- How to display page title+link of page created by user
- Modify theme to get page excerpts on front page
- get_page_by_title not working when used with a variable
- How to disable Page Attributes dropdown in wp-admin
- CMS: Making complex pages editable by the end user
- Guidelines for adding static pages
- Sitewide page on all the blogs in the network
- How to create a page when a theme is activated?
- How to echo excerpts with wp_list_pages?
- Remove pages from backend list *and* update counter accordingly
- How do i fix? WordPress database error: You have an error in your SQL syntax;
- WordPress Admin – Add Edit link to specific page under Pages Menu
- Show child pages and sibling pages on the child page
- Creating a form contact page?
- Making a wordpress page the index on the site?
- How to call wp_list_comments() outside of the comments template?
- Using Pages to handle calls for custom post types
- Displaying Subpages while on Parent page?
- Guest authors, sort of like Wikipedia, but more theme-able
- Show own shortcode data on each page
- Pages views limit [closed]
- Redirect to page list when page published
- Having wordpress page accesss issue under sub-directory
- How to make my category archive behave like a page
- Add external css to Contact Page
- Role can edit just one page [closed]
- how to edit source code of specific page in wordpress?
- Where can i make an html change to a specific page [closed]
- Cannot enter “::before” for li tag when editing a WordPress page
- How to get page_id for url rewrite or how to use page slug for calling a page?
- WordPress backend:How to hide some specific pages under Pages–>All Pages
- Different header for each page in child theme of twenty thirteen
- Change a Page’s Header Image
- Dynamic href link to Contact Page
- Restrict the list of parent pages to only those which are created by current user
- how can i remove page title on desktop view
- Use content from one page in another template
- Is there a way to schedule changes to a page?
- Is it possible to change slugs’ default behaviour?
- List child pages within page template
- Option for pages order in backend
- Return subpages of an author if the parent page was published by an other author
- append one page content into another
- Allow a user to edit their own page and profile only
- on page creation few inline style properties gets removed
- Custom folder for wordpress page templates
- Page not appearing under its Parent
- Separate URL for a specific page
- Pages that don’t look like blog posts?
- Next and Previous Page links based on ‘Order’ attribute
- Create multiple pages with tables from json file
- register_rest_field only for specific page
- Update Pages ONLY from Stage to Live (not products)
- Change page width in refined magazine/mag and news theme
- How do you run code on a specific page without missing the init hook?
- Every change made by “Author” role is going to “pending review”
- Groping Pages Per Department Option
- if is_page() is not working with wp_redirect
- WordPress default theme cannot get full page on entry content div
- Assign Parent Page – Now 404 Error
- Create multiple custom HTML pages
- WordPress displays widgets out of whack
- Add homepage to the list of pages in the Footer Widget
- How to remove the duplicate title tags and duplicate meta descriptions?
- Two different layouts for the same post
- My page title turns into a h2 tag – What to do?
- Add pagination to search.php page
- How to turn post into pages and via versa?
- Content not displaying on page
- How do I get my page “About” to show up on my WordPress site?
- Display child pages on homepage template
- Pulling posts tagged with similar title name
- Temporary download page or restrict static download page based on how the user got to the page?
- search page different results
- List Parent page with sub pages
- simple category search form returns full text – but I need excerpts
- Naming custom page templates
- How can I use Page editor for two separate templates?
- Sort the data in WordPress using get-page-by-title
- Adding a filter to wp_edit_posts_query() to prevent hierarchical display of pages
- Order pages by date
- wordpress user profile page
- In WP, Google map error initMap is not a function [closed]
- Fresh WordPress installation not able to simply show page content