To get a custom field value outside of the loop you need to call global $wp_query
to get your post id.
global $wp_query;
$postid = $wp_query->post->ID;
$image = get_post_meta($postid, 'Thumbnail', true);
Related Posts:
- WP_query returns error when used for custom widget
- Individual Widgets per Page
- Can I query custom meta data through WP_Query
- Having different sidebar content for MANY pages?
- When using add_post_meta and update_post_meta, is there any way to give the individual arrays keys?
- WP doesn’t show Array Custom Fields?
- How do I search an array stored in a custom-field using WP_Query?
- Get custom field values into the sidebar/widget?
- Is it possible to store arrays in a custom field?
- Order posts by custom field and if custom field is empty return remaining posts
- Best way to allow manageable social media URLS?
- Calling Specific Pages with wp query Part II
- Loop through two different sets of custom fields
- use get_posts to get custom field data, but in one array
- Saving an array in a single custom field
- Adding a custom field or metabox to the post-thumbnail widget?
- How do I exclude posts by custom field value?
- Echo values from custom field outside loop php
- How do you create dynamic customised sections in WordPress?
- Upcoming Event: How do I sort database by custom date field, but ignore past dates?
- Calling custom fields for pages (not posts)
- Duplicate posts being displayed when querying Custom Fields
- Get specific custom field keys from a post and put into an array
- Creating a custom menu/widget area
- Loop to display random posts only if a custom field matches category
- WP Query Returning All Posts
- Passing Custom Field Data as Array to be Saved (Resulting Custom Field Array is inconsistent)
- How can I show custom fields in the loop only to specific user roles?
- get_posts that match a user-specified value on a page
- Creating a widget with a number of custom fields
- Accessing loop functions (e.g the_title or the_content) from post ID
- Run a check for multiple meta key values
- Create an Array of Specific Custom Post Meta
- Remove Body Classes
- Limit the number of acf content when displaying in post loop [closed]
- How to display image inside container of custom made widget
- Want to make A CSS if meta key value is empty
- Is there a better way to list all database terms alphabetically?
- Change the main loop WordPress impact on the server?
- how to display a widget only on a page where the custom field is defined?
- custom-meta-box checkboxes from loop won’t save
- Sort alphabetically by custom field
- How to show a post if was published less than two hours ago?
- List users by sum of all their posts’ custom field values
- Custom Fields – How to create a list from multi-line entries of a single value
- how to make nsfw post with thumbanil
- Loop through incrementing custom fields
- query_posts with meta_value
- Is there a way to dump all registered sidebar/widget?
- do_shortcode close
- Search Results Page – Displaying Custom Meta Fields
- Display custom widget value in header.php
- Add custom data (field) to sidebar widgets for later display
- Displaying an ACF list of users
- Meta value Array
- Interrogate a page within a loop to check template type or custom meta data (Pages vs Posts)
- Collect Data from NEXT item while in loop
- Custom field to array?
- Show array of meta_value in Edit Post Coloum
- How to Convert Custom Fields from Text to Array?
- How to show content of custom fields in search results?
- Display metabox title for custom fields with values
- wp_get_attachment_image_src() with advanced custom fields returning empty
- Get custom post fields from multiple metaboxes
- use custom field value as post category in loop
- Working with multiple values and metaboxes
- Filter or order based on custom field
- Compare ACF date field (if exists) and post date and order DESC
- Custom Field: how to save array of multiple key-values in WordPress
- What am I missing in this Code Block?
- get_field values for each post on home page using wp_add_inline_style
- User Filter Options on Archive Page
- Custom meta boxes – add php code inside?
- get wordpress post loop by meta box date
- How to save array option as text and not integer?
- Outputting custom field on home.php not outside of blog list
- Counting number of images from loop
- Metabox value for post loop?
- Should I store arrays in custom fields or create custom tables?
- Get meta value when the page is a blog archive
- How do I use foreach to get content from a custom-field in multiple posts?
- Add class from custom field into widget class
- Running a Gallery Shortcode in a Custom Fields Widget
- I want my post to republish again after adding a custom field
- Display posts where date field matches current month?
- Filtering posts by WORD in custom field
- I would like to display different text on different pages
- How to check if custom field exists in this widget query
- Retrieve IDs from custom field, count and display results differently according to count
- Pagination not displaying correct number of pages
- Display custom field outside the loop
- Adding custom field to an array
- How do i output images from URL’s added to the same custom field key
- Extract array from custom field
- Build Array from Input Fields question
- Custom field not showing
- Order by a meta field in query loop
- Custom fields: Split data from single custom field’s sub-array to separate custom fields when saving post
- Add fields to edit in custom widget
- get_the_ID() retrieves same ID on Gutenberg’s Query Loop