The Codex is your friend. There’s a the_widget() function for that.
<?php the_widget( 'MY_Widget', $instance, $args ); ?>
Refer to the Codex entry for values for $instance and $args.
$instance = array(
'title' => 'Some Title here',
'name' => 'Some Name here',
'show_info' => true
);
$args = array(
'before_widget' => '', // Your value here
'after_widget' => '', // Your value here
'before_title' => '', // Your value here
'after_title' => '' // Your value here
)
Related Posts:
- Individual Widgets per Page
- Having different sidebar content for MANY pages?
- Add custom fields when specific templates are selected
- Get custom field values into the sidebar/widget?
- passing argument to get_template_part() or a better way to code
- Custom Page Template [closed]
- Best way to allow manageable social media URLS?
- How do you create dynamic customised sections in WordPress?
- Creating a custom menu/widget area
- Creating a widget with a number of custom fields
- List taxonomy term “Last Name” + “First Name” (taxonomy custom field) in a post loop
- Adding an editable field to template?
- How to display image inside container of custom made widget
- Want to make A CSS if meta key value is empty
- how to display a widget only on a page where the custom field is defined?
- What’s the best way to implement custom widgets on a per post basis?
- Is there a way to dump all registered sidebar/widget?
- Add custom data (field) to sidebar widgets for later display
- Custom field outside the loop and inside an array
- Add a field to just ONE page
- How to set up page fields with gutenberg instead of ACF
- How do I update custom field post meta in frontend post template?
- WP_query returns error when used for custom widget
- Add class from custom field into widget class
- Running a Gallery Shortcode in a Custom Fields Widget
- Group pages by custom field values
- RSS Feed in Custom Field
- I would like to display different text on different pages
- How to check if custom field exists in this widget query
- Advanced Custom Fields for Header that are Editable from a Page [closed]
- How to apply Local Business Google Schema dynamically on a Custom Post single template?
- Add fields to edit in custom widget
- Custom Post Type Data in Sidebar widgets?
- Is it safe to store a user setting you don’t want the user to ever modify as a user option?
- extend Meta Box / Document Panel
- Add multiple images to a page sidebar
- getEntityRecord without knowing the post type
- Metabox nonce PHP notice
- How to break meta values into different items and avoid duplicates?
- ajax delete value from custom field array
- How can I query on the year part of a complete date in a custom field?
- WordPress Custom Field Should be Unique. Is it possible?
- How to display Meta Field Value?
- What is the cleanest way to extract custom variables from a post
- Add source URL from Feed WordPress (Syndication) plugin to a custom field in post editor
- user Profile meta value as custom field
- Remove Body Classes
- Use WPbakery for own custom field [closed]
- Change the sort order for posts to include custom field
- Button inside Custom Meta Box triggering the Update Button
- When creating a metabox do you have to create DB fields for the data?
- Best filter to use for modifying custom fields on a post?
- How do I query the title (or handle?) of post meta fieldset (created with Simple Fields Plugin)
- Is it preferable to use custom code to create metaboxes instead of plugins (such as ACF) and if so why? [closed]
- Function that replaces the image in the absence of the post meta
- Is there a way to set default custom fields when creating a new post?
- Add custom column for custom field
- ul list with only as many li’s as filled custom fields
- The conditional logic only works to show or hide?
- wordpress multi user question
- How to sort post listing on a page using custom field value?
- Odd functions.php issue in WordPress
- ACF multi taxonomy on filterable gallery
- How to improve my non-unique metadata MySQL entries?
- Unable to change checkout placeholder text
- Store comment form custom field in custom database
- Sorting post by custom fileds date
- Query multiple meta values at the same time :
- get wordpress post loop by meta box date
- Sort posts by custom fields with empty values
- Sub Field of File Field
- ACF plugin and field update
- Add custom field to post with some part of url as value
- CSS conditional on custom field value
- My meta boxes update wp_postmeta of posts but not of pages. What is wrong with the code?
- same custom field for single posts
- Import data from arbitrary CSV to WPAlchemy meta fields
- Post thumbnail size for custom field only
- Display meta data from a custom field within plugin Category Grid View Gallery
- custom field output after the_content
- Insert shortcode before and after a list automatically
- Change post status by custom fields
- update_post_meta based on acf repeater field
- How to include custom field in shortcode (do_shortcode) in theme file
- Custom fields: Split data from single custom field’s sub-array to separate custom fields when saving post
- How can I copy value from dropdown once I select it to text area as text?
- Create taxonomy terms from custom field values
- Save Custom Meta Value on Media Upload
- Is there a plugin or another way that can help me find out the underlying files of a page/post? [closed]
- Is there a way to read JSON data inside Custom Fields without editing PHP? [closed]
- How to add new Metadata options (Date, Author, etc.) for Posts?
- Saving multiple custom meta box fields
- Modal pop-up HTML code works on other sites or HTML viewers but not in the custom HTML block within a wordpress page?
- Automatically changing a posts status to draft based on magic fields [closed]
- Image inside the content is replaced with featured image from my older post
- Can I count every article following extracted meta value?
- I have design Tab in a Bootstrap 5 in row. And repeat row in ACF. only 1st row tab data is show. other row data off tabcontent appearing display:none
- Custom post type needs to capability to create and edit by some specific user role
- Sort posts by numeric value of custom field, and also show any other posts without that custom field
- Sort posts by numeric value of custom field, and also show any other posts without that custom field