Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6996723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:11:37+00:00 2026-05-27T20:11:37+00:00

On the WordPress widgets page you can see that some widgets’ width increases when

  • 0

On the WordPress widgets page you can see that some widgets’ width increases when you click/toggle them in the sidebar. How can I do that with my own widgets? I’m using the WP_Widget class.

Thanks!!

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:11:38+00:00Added an answer on May 27, 2026 at 8:11 pm

    When you register the widget you can set the widget control options, which enables to control the width.

    Check the following sample code:

    <?php
    class WP_Widget_Text_Link extends WP_Widget {
    
        function WP_Widget_Text_Link() {
            $widget_ops = array('classname' => 'widget_text', 'description' => __('Arbitrary text or HTML with Title linked'));
            $control_ops = array('width' => 600, 'height' => 350);
            $this->WP_Widget('textlink', __('Text with Link'), $widget_ops, $control_ops);
        }
    
        // stripped down remaining code for the widget, which are not needed for the answer.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Wordpress has a filter that automatically add paragraphs to posts. I can remove this
I would like to create a front page for a Wordpress blog that contains
How to selectively display pages on sidebar? I have some pages that i want
I have some jQuery powered widgets on my WordPress site. They all work fine
I have a WordPress blog on my website. But I've created my own page
i´m having some difficulty applying style override to all widgets in my wordpress theme.
The following code will add the categories selector widget to the WordPress Page editor
I am using widgets in my wordpress theme and I need to remove the:
I'm trying to put together a simple RSS widget (for my wordpress blog) that
In Wordpress it's possible to create own WP Querys for the loop. An example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.