Just register another widget area. Don’t take the name sidebar literally, you can use the fields anywhere on your page.
In your theme’s functions.php
:
add_action( 'after_setup_theme', 'register_multiple_widget_areas' );
function register_multiple_widget_areas()
{
register_sidebar(
array(
'name' => 'Sidebar',
'id' => 'sidebar',
'description' => 'describe the function of the box.'
)
);
register_sidebar(
array(
'name' => 'Header',
'id' => 'header-widget',
'description' => 'Goes at the top of the page.'
)
);
}
And wherever you need the header widget call:
dynamic_sidebar( 'header-widget' );
See also register_sidebar()
and dynamic_sidebar()
.
Related Posts:
- changing wp-admin/widgets.php
- Text Widget creates a
- dynamically add scripts to WP_Widget widget() method
- What is the quickest way to make a widget?
- Changes in widget customizer not triggering ‘save and publish’
- Embed iframe or html page into dashboard widget
- Where to find the source code of a widget?
- How to add author details in the post sidebar?
- Woocommerce Product Category Widget – hide categories that have no products in stock [closed]
- Why will using __construct instead of widget_class_name when creating widget trigger out of memory error
- Role that can edit only widgets, not other theme options
- When to use which plugin output method?
- Hooking Into Widget Output Loop
- Hide widget to non-logged in users without plugin (functions.php) [closed]
- How to add css classes to widgets using functions.php?
- WordPress: Apply filter/hook to a particular sidebar widgets?
- wordpress widget textbox in the sidebar
- parse json object and display live in wordpress php widget
- How to check if searchform.php is being included as widget?
- Is it possible to enqueue a script from a widget method (of extended WP_Widget object)?
- How to get sidebar’s content inside admin-ajax?
- Widget – Store and update data
- passing variables inside a widget add_action
- Making the default “Latest Posts” WordPress Widget Show Thumbnails
- Text Widget Links Not Working
- Display the id list of active widgets of same sidebar?
- Add description to custom text widget and display the 5 recent post titles
- Add individual tag to widget title in sidebar
- Where do I save widget code for wordpress?
- How to allow your custom widget as block in gutemberg editor
- How to save widget fields generated from an array?
- Remove image height/width attributes from Image Widget
- Need help using a filter on the default Categories widget
- How to display an RSS feed widget inside a page?
- widget dropdown menu code
- Newbie: Help with Vertical Spacing on Footer Widget [closed]
- custom widget does not saved value
- php to add a link into wp widget without specific url
- Widget Select Options not saving
- Copy Widget Settings because of changed IDs
- How to call widget by widget’s id?
- Why is my custom widget breaking another one?
- Show a widget as a sidebar fallback
- disbale default widgets on theme activation
- in_widget_form detect sidebar id
- function WP_Widget::widget() must be over-ridden in a sub-class. when create new Widget
- How do widgets access posts they should display?
- How to move top widget to the left – Responsive Theme WordPress
- How do I deactivate widgets by name?
- Remove links from meta widget
- How to register a widget when saving a post?
- Can’t display custom widget
- How to make home widgets appear horizontally
- Using more widget in main page cause slow loading WordPress? [closed]
- add_action not working within widget() of WP_Wdiget
- WordPress custom widget undefined variable notice
- How do I make the title of the following widget editable?
- Add links widget to self-hosted blog?
- How to add Ajax to the default widget calendar to support next/previous months loading?
- prevent custom widget file names from showing in Appearance > Editor
- Issue with checked() echoing on to page
- Add a widget to a static front page
- Last Update time in widget
- Adding dashboard widgets to show – custom post type stats, information from other plugins
- Upgraded to 3.3, My Widgets Disappeared
- Register new widget
- How to use register_sidebar’s ‘before_widget’ unique id generator into its other parameters like ‘before_title’?
- Set a dashboard widget to the top?
- Dynamic Bootstrap Carousel ID per widget on same page
- How to decorate WP_Widget_Text?
- Tabs widget from Elementor is not showing the content in it to users. But at admin side it is working fine
- Widget title showing below widget
- Siderbar implementation with collapsible bootstrap cards
- Title not Emptying in a Widget
- Get a list of all Widgets registered in WordPress admin widgets-area
- How to implement widgets error output with data validation?
- Simple SCript Not Displayed in WIdth
- how to get value of a select box in custom widget wordpress
- Using the_widget Multiple Times
- Conditionally Load a Script if a Certain Widget is Shown on a Page
- Where to add a widget class?
- Nonce and widget
- Active Sidebar Conditional Question?
- How to give a File Upload option in wordpress Widget backend?
- Pass widget variable to external function
- Widget front-end fails to echo as expected from checkbox
- Can I use widgets & shortcode if I need to return an array?
- Widget area does not show any contents for specific users in admin interface. How to go about debugging?
- Creating an custom admin page for editing widgets
- Show or hide a widget from pages
- Author Link in Recent Posts Widget
- Custom widget breaking widget section in admin menu
- Custom widgets do not appear in dashboard > appearance > widgets
- How to customize dynamic_sidebar rendering? [closed]
- Can’t use is_home in template-functions.php
- How can I order the “Woocommerce Products Widget” by the sales date? [closed]
- How to show WordPress Dashboard Widgets on Frontend?
- how to add multiple menu in custom menu widget?
- Widget block editor: Unable to collect checkbox values inside widget update() method
- How to add the “page” post type to Recent Activity widget displayed in admin?