This can be set by passing arguments to the $control_options of the parent widget constructor, which is the fourth argument. Here is an example constructor:
class Custom_Widget extends WP_Widget {
/**
* Sets up the widgets name etc
*/
function __construct() {
$widget_options = array(
'description' => __( 'Featured Pages Widget.', 'affiliate' )
);
$control_options = array(
'width' => 750
);
parent::__construct(
'custom_widget', // Base ID
__( 'Custom Widget', 'text_domain' ), // Name
$widget_options,
$control_options
);
}
Related Posts:
- How can I modify the WordPress default widget output?
- How to hook into unregistering a widget instance?
- Filter Widget Title Wrap
- Is it possible to remove the filter from 4.8 text widget?
- Anyway to edit the titlebar of WordPress Widgets in the Admin area?
- WordPress tag cloud add more links
- How to add a class to Tag cloud widget link?
- Warning: Missing argument 2 for widget_title filter
- Add Bootstrap Classes to Recent Posts Widget
- include specific Pages to wp_list_pages with filter
- Shortcodes within the sidebar text/html widget: How to preserve the raw HTML output of the shortcode?
- I’ve set up an extra field for all the available widgets. How do I show it’s value in the front-end?
- Archive Widget – Count only parent posts
- Widget image reorganize layout
- How can I change the button text of a custom widget?
- WordPress Tag Cloud Filter Prevents Widget HTML from loading
- How can I add a prefix to titles displayed in sidebar using function.php?
- Filter WordPress Archive Widget to exclude posts with specific custom taxonomy term id
- Output dynamic_sidebar_params in wp_head
- Filter on widget-title does not work with custom links
- How to use apply_filters(‘get_calendar’) to change get_calendar() output?
- Filter widget_pages_args not working in Pages Widget
- How to filter users on admin users page by custom meta field?
- How to influence the information displayed on widget inside wp-admin
- Custom theme hooks / filters – passing arguments
- What params are available with the_content filter?
- How to hook wp_list_pages?
- Hook into admin post list page
- Add post/page ID to inserted links within the_content
- How to exclude/filter a tag from get_the_tag_list()
- Filter the blog’s title without using global variables
- user_has_cap filter allows edit but will not allow save
- Hook different functions to the same filter conditionally OR Pass additional arguments to existing filter?
- where to apply “apply filters” and other Sanitization Functions
- Add guid filter to attachment in media library grid mode
- 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
- Is there a wildcard/catchall filter hook?
- Apply the_content filter, but prevent other hooked actions
- Filter my args by the post 1st letter
- apply_filters/do_action tag characters limit
- Adding Filter to Homepage only
- the_excerpt filter with an empty excerpt
- Add Defer Attributes to WordPress Scripts with consistent versioning
- Does auto_update_plugin Filter Work When Put In Theme’s functions.php File
- Remove CSS & JS files from WordPress Main Page For Increase Pagespeed?
- String regex match replace for role ‘contributor’ only
- In need of a content replace filter for posts in a specific wordpress category
- Can plugins that filter post contents work on posts from Word 2007?
- How to filter post content and force every link () made in blocks to return urldecode() with readable value?
- Better extend a class or use add filter/action hooks?
- Link to Shop-Filter with .current-menu-item
- Adding a Clone link to product attributes – post_row_actions() filter, or how to override a Class question
- Remove posts inside pre_get_posts using a custom query
- Remove / Hide Attachment Display Settings in Add Media popup / dialog
- how to customize rss feed tags using hooks?
- Issue understanding and using WordPress filters and actions
- Woocommerce “added to cart” message on main(home) page
- Why does adding a filter to ‘the_title’ break the server?
- Is it possible to apply filter to meta key value when querying posts?
- Add filter for specific post type only
- apply_filters with multiple args and multiple add_filter
- Avoid user registrations with specific email provider
- Should I remove_filter in order to replace a filter?
- How can I specify the post status of an untrashed post?
- filter hook to load a different post/page on current post/page
- How would I be able to use a font awesome icon as a user’s avatar?
- Rewrite rule and display of post
- add_filter the_content doesn’t work
- Redirect to woocommerce checkout after adding to cart – item already in cart
- How to append custom text to the output of ‘categories widget’?
- Passing variable from child theme function to parent theme filter
- `authenticate` filter never gets called
- paginate_links() Change the order of links
- Add Filter – Pass Variable (PHP < 5.3)
- How to disable a wp filter in a certain admin panel page
- Is there a filter to programmatically change the HTML tab switching output of the page editor?
- Why does admin_body_class not work?
- post_orderby filter breaks function
- Disable Remember Me in Login Form
- Counting a WP_Post Object value in an arary, using a filter?
- How to track a particular page in order to address the loading speed issue
- List all categories that have results in a query
- How to filter page title for certain page?
- how to overwrite next_post_link
- Displaying posts on a page that have been assigned a value in a database
- Replace Text with hyperlinks
- Adding filter to an specific page/site direction
- How to filter wp_get_recent_posts() to only posts that have thumbnails?
- How to check which submission button was clicked?
- check, if any “add_action” function contains string XXXXXXXXX
- remove_action conditionally for Custom Post Type – not working
- wp_get_attachment_link filter not working
- How would I remove an inline googleAPI font script in the the parent theme header.php?
- Getting entry ID from frm_email_message filter in formidable
- Is there a hook or filter that adds a button to the left of the search box?
- Filter and manipulate the get_current_user() function
- add_filter(‘the_content’, ‘method’) does not trigger my custom method
- woocommerce_coupon_is_valid_for_product not working to exclude specific product tag
- Replacing text using add_filter
- Background color and background image below element in Contact Form 7 – error tip [closed]