Your code worked for me; The widget appears in the admin area under Appearance > Widgets and the widget does show output on the front end.
Your widget()
method is missing the output for $args['before_widget']
. echo $args['before_widget'];
should be added above <section id="box" class="box1">
.
This would not cause the issue reported, where the widget does not appear in the admin area, but it will cause problems with the HTML output on the front end.
Related Posts:
- changing wp-admin/widgets.php
- WordPress 4.8: Using multiple WYSIWYG-Editors with media inside of Widgets how to?
- How to Remove All Widgets from Dashboard?
- How can I delete all inactive widgets?
- Completely disabling widgets
- Elegantly using JavaScript on widget admin forms
- add_page_menu to make shortcut to widgets
- Remove/Add widgets from/to the Available Widgets pool
- jQuery UI inside widget on admin page
- Add field to dashboard to update embedded URL on homepage?
- Dashboard Widgets – Add Admin Page With Same Functionality
- Drafts widget for admin page
- Grabbing how Many Posts by Month for a Dashboard Widget
- Validating widget’s configuration data on Admin page
- How to remove Help tab and the Dashboard widget area’s empty border
- Widget page stopped loading
- Issue with checked() echoing on to page
- Handling dozens of sidebars
- Widget stuck at particular point when dragging to bottom
- Widget Areas Still Appearing in WP ADMIN When They Shouldn’t
- jQuery “on” handler does not fire on newly inserted widgets [closed]
- Limit number of Widgets in Sidebars
- How to load Widget javascript + css files only if used?
- check if registered sidebar is active & has widget content
- How to use wp_dequeue_style() for style enqueued in WP_Widget class
- Programmatically edit the text of a widget
- Create a Widget Area in the Navigation Bar for the Genesis Theme Framework?
- Customized widget area – how to override or filter class xoxo?
- Unable to get Alert function to consistently work with backend widget with latest WP
- Widget options get
- Custom Menus, Widgets & Conditional Statements
- Dynamic widgets
- How do I stop a widget from displaying on mobile site?
- cannot drag and drop widgets since wordpress 3.2.1
- How/where is the global variable $wp_registered_widgets filled?
- Converting a WordPress widget to a block
- Change recent posts widget title
- Hide all Dashboard Widgets (not remove)
- Widget modifications in a child theme
- Is there a way to extend the default image widget into a new custom widget and add additional fields to it?
- Conditional Tags Based on Previously Viewed Posts
- Make page jumps in widget
- Widget without DIV wrapper
- Widgets not displaying since 4.3
- Custom widget with WYSIWYG
- Limit number of widgets in widget area
- How to create pagination for homepage with widgetized area?
- Hooking action once but called twice
- How can I add an author-box below a post?
- Override WordPress Widget CSS Classes?
- Help me out with this Undefined index ?
- displaying tags in a widget
- Dynamic Sidebar and XHTML Validity?
- Displaying a WordPress widget by name
- How to use wordpress content class?
- How to use get_results() in widget front end?
- How to best include widget area just on homepage?
- Remove “Content” and “Discussion” from Right Now Dashboard Widget
- wordpress widgets screen disappeared
- Different widgets in sidebar on sub-children pages?
- Can the qTranslateX-Plugin translate non-article text? [closed]
- Is there any tab widget plugin supporting third party widgets? [closed]
- Add footer widgets
- Widgets in WP 4.3 disappearing – How to fix?
- Making jQuery .change() event persistent after widget save
- Widget background images missing on second blog excerpt page
- How should I add a “widget” like element?
- Custom CSS for a particular text/html widget in WordPress
- Removing side bar widgets from GovPress theme
- What conditional to use for dynamic sidebar check?
- How to test if the widgetized area has any widgets?
- Saving widget gets an undefined variable
- Trouble accessing a multidimensional array to add classes to default WordPress widgets
- Distinguish between different widgets of the same type
- links to Media Library content in sidebar per page
- Why is registering a sidebar for each page causing my sidebars to reset?
- widgets in footer?
- Can you hide a widget based on its content?
- Quick Draft widget in weird place on dashboard after being re-added
- How can I remove WordPress element IDs and Class names in the HTML?
- Remove widgets on mobile front page without affecting desktop
- Widget display nothing
- Collapsible widgets [closed]
- Widget settings disappear after refresh
- How to display author meta in a sidebar widget
- Is it ok not to set widget in the main page of a one page WordPress Theme?
- How to get widget content in WordPress based on it’s ID?
- Recent Posts Widget URL / Domain change
- New Custom Widget Call a Different Widget Function
- Loading scripts only if a particular shortcode or widget is present
- How to change text of a widget depend on condition?
- Insert to wp_footer if widget is found in the sidebar
- Using javascript on the new widget preview / customizer page
- List.js inside WordPress widget
- Show or hide custom menu widget in side bar conditionally
- Custom tabs widget don’t work in google chrome, is blocked, do not change the tabs. Why?
- WordPress Hide Widget If $_Session Is Active?
- Widget which displays thumbnails, but links to urls?
- Using Conditional Tags to restrict something to 1 user?
- Problem on register/login widgets