QueHow

A How-To and wiki Blog

  • Operating System
    • Windows
      • Windows 10
      • Windows 7
    • Linux
  • Software
    • Application Software
    • Microsoft Office
      • Outlook
      • Word
      • PowerPoint
  • Internet
    • Browsers
      • Mozilla Firefox
      • Google Chrome
    • CMS
    • Tips & Tricks
  • Website
    • ecommerce
    • Google
    • Social Networking
    • General Websites
  • Mobile
  • Email
    • Gmail
  • Wiki

How to Add Widget Area to the Header in WordPress

By Neha T Leave a Comment

The WordPress widgets are used to add additional functionality to your blog or site. They are standalone areas of code which can be of any type such as Search bar, text, calendar etc.

In this article, there is a step by step explanation that guides you, how to add widget area to the header in WordPress. The Widgets are usually available at sidebars of any website, but it is purely up to you that where you want to add it. It can also be added to the header or footer.

Steps to Add Widget Area to the Header in WordPress

Step 1: Firstly, from the Appearance menu , click on “Editor”.

How-to-add-widget-area-to-the-header-in WordPress-step1

Step 2: Then from the given Templates go to “functions.php”.

How-to-add-widget-area-to-the-header-in WordPress-step2

Step 3: Insert the code shown below under fuctions.php and click on “Update”.

if ( function_exists (‘register_sidebar’) )
register_sidebar( array(
‘name’ => __( ‘Header Widgets Area’, ‘twentythirteen’ ),
‘id’ => ‘sidebar-header’,
‘description’ => __( ‘Header widgets area for my child theme.’ ,  ‘twentythirteen’ ),
‘before_widget’ => ‘<aside id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</aside>’,
‘before_title’ => ‘<h3 class=”widget-title”>’,
‘after_title’ => ‘</h3>’,
) );

How-to-add-widget-area-to-the-header-in WordPress-step3

Step 4: Click on “header.php”  below the functions.php as shown in the image below.

How-to-add-widget-area-to-the-header-in WordPress-step4

Step 5: Insert the code mentioned below, after that click on “Update”.

<?php dynamic_sidebar(‘Header Widgets Area’); ?>

How-to-add-widget-area-to-the-header-in WordPress-step5

Step 6: Header widget is now added to the widgets section, to make any changes go to “Widgets” under Appearance menu.

How-to-add-widget-area-to-the-header-in WordPress-step6

Step 7: You”ll see “Header Widget Area”, here you can add the widget which you want to display in the header.

How-to-add-widget-area-to-the-header-in WordPress-step7

Step 8: Drag  the widget from Active or Inactive Widget & Drop it to the “Header Widget Area”.

Here I have added “Search” widget and then click on “Save”.

How-to-add-widget-area-to-the-header-in WordPress-step8

Step 9: Your widget will appear on your blog like this as shown below.

How-to-add-widget-area-to-the-header-in WordPress-step9

You Might Also Like:

How to Add a Widget in WordPress How to Add Custom Registration / Login form in WordPress Using a Plugin How to Add Read More Button in WordPress How to Disable Right Click on Images in WordPress through Code / Plugin How to Disable Comments in WordPress Blog or Page How to Disable Comments on a Specific Page in WordpressHow to Disable Comments on a Specific Page in WordPress How to Disable Right Click on WordPress using Plugin

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Most Viewed

  • How to Install and Use TELNET in Ubuntu
  • How to install Hindi fonts in MS Word
  • How to Change a File Extension in Windows 10?
  • How to create a flipkart account in 3 simple steps
  • How to Change Monitor Refresh Rate in Windows 10?
  • How to install IIS on Windows 10
  • How to Insert Clickable Checkbox in MS Word 2016?
  • How to Set Auto Reply in Outlook 2016?
  • How to Login as Administrator in Windows 10?
  • How to Check RAM Size and System Type in Windows 10?

Recent Additions

  • How to Add Hyperlink to Another Sheet in Excel?
  • How to Add and Remove Watermark in Excel
  • How to use Relative and Absolute Cell Reference in Excel?
  • How to Enable and Disable Scroll Lock in Excel?
  • How to Use INDEX and MATCH Functions in Excel?
  • How to Make Bar Graph in Excel?
  • How to Count Duplicate Values in Excel?
  • How to Wrap Text in Excel?
  • How to Round off Numbers in Excel?
  • How to Create a Bell Curve in Excel?

Related Searches

  • How to Change the Date Format in Excel?
  • How to add screensavers in Ubuntu 14.04
  • How to Freeze Rows and Columns in MS Excel 2016?
  • How to Delete Blank Rows in Excel 2016?
  • How to Check your Processor Type in Ubuntu 14.04

Copyright © 2023 · QueHow · Contact Us