Try passing the post ID as the second parameter:
the_field('sub_title', $instance['post_id']);
Related Posts:
- How can I use the built in WordPress “browse link” functionality?
- Modifying the default search widget
- Prevent widgets removal
- Is there a way to add more tags to the tag cloud?
- How to build widget with arrays inside arrays?
- How do I save data from submitted form from widget
- Why Can’t wp_editor Be Used in a Custom Widget?
- Add New Footer Widget Area with Limited Options?
- Add div class to only one widget
- How to use control_callback when creating a widget via functions.php or plugin?
- Disable default WordPress widgets in sidebar
- Updating to Version 4.5 bumped my “main sidebar” widget out of place
- How can I delete all inactive widgets?
- Adding classes to dynamic sidebar
- Need help adding additional controls to a custom widget
- Why do none of my widgets have a title?
- Widget area inside a widget
- Defer Code in Widgets – Page Speed
- Where are widget configurations stored?
- Bolding specific word(s)/parts of widget title
- Adding a widget to a string of HTML
- Multiple users editting widgets
- Trying to wrap around first word of multiple word strings with a widget_title() filter, only works on two word strings and not more than two
- How to hack recent comments default widget?
- Recent Posts widget without Title
- Pre-install widgets in WP-Admin
- How to change plugin`s template (view) correctly?
- Showing a Thickbox (tb_show) does nothing
- How do I add a widget from an Android phone?
- Error gets thrown when calling require_once on widget.php
- How to activate or install the Gallery Widget?
- Getting a div wrapped around two widgets
- How to create a widget that accepts html input?
- Widget changes in customizer ajax error to many options?
- How to Add TinyMCE to widget
- How can I get the first section of a page 100% width, while the rest will have a sidebar? [closed]
- Widgets not adding div on before and after title
- Modify ‘Sizes’ Attribute for Images with Specific Class
- Dynamically add content to an existing widget area
- Simple widget causing whitescreen
- How to stop comments widget conflicting with theme comments
- How do I create a widget to embed the code for a sign up form, so that the sign up form appears on every page?
- Tabs and Category Widget
- How to change the default class for the widget title?
- How to add the same widget twice?
- How to hide widget if current category has no posts assigned to it?
- ‘is_author()’ logic in widget for author only
- Unable to load “wpColorPicker” on theme customize page
- Undefined Variable in my widget
- Update widget form after drag-and-drop “only specific plugin”
- Recent Comments from Specific Category Widget
- Different sidebars not changing
- Placing a widget with $wpdb query
- How to make widget appear conditionally
- How Migrate a Legacy Widget to block?
- Ampersand breaking Widget title
- How to allow editing of text in sidebar?
- Shortcode into widget
- How to show avatar of current logged in user in a widget
- Got a problem with a widget
- Widget control – putting a slideshow in the widget area
- How to paste widget to a specific page
- How do I find out which
- How to update a widget data?
- An archive widget, coming from nowhere on my posts and pages
- custom widget not saved to sidebar
- When editing in block editor, the post/article gets under the floating widgets
- Recently changed domain name. Home page widgets are now not in the customize menu yet still being on the page
- Make widget with media upload repeatable
- Is it possible to dynamically output the name of the widgets?
- wp_registered_widgets doesn’t contains my widgets
- How can I write this code snippet so that it echo’s the response when submitting empty fields?
- What is the difference between widget object and widget instance?
- Apply two different styles to Wiget Titles along with a decorative line
- My plugin works in home page, but doesn’t work in post page
- Widget text color change
- Widget to embed youtube video
- Can I use wp_widget_rss_output to show my site’s feed in the dashboard?
- How to make featured area?
- Checking if widget has title not working
- wp_list_categories + widget
- How can I add widgets to the category page?
- Remove default WordPress widgets
- widget that will do shortcodes that user inputs
- Disable wordpress widget automatically on error
- Can I add a widget to the of my site?
- Widget dynamically add new input field
- How to show widget in frontend?
- Registering multiple copies of a widget
- How do I stop out of stock items from appearing on my WooCommerce site when using the Layered Nav widget [closed]
- Single Widget Multi Sidebar
- An issue with register_sidebar and the admin interface
- page url in shortcode
- iframe/embed vid in text widget loads outside container and moves around when scrolling the page?
- Add text to Text Widget using Javascript
- Widget on home page displays wrong time compared to same widget on inside pages
- Subpages menu on sidebar plus widgets
- Widgets in PHP files?
- Text Widget Not Working
- Sample widget code which get data(1-5 record) from Wp_Admin panel and display to Homepage(WordPress Custom Theme)