This is one I keep on forgetting and have to Google on numerous occasions, so I’m adding it to my blog as a reminder.  I like to refer to the Sidebar in WordPress blog by Justin Tadlock, it’s old, written in 2010, but as far as I can see it still work.

There’s 3 parts to creating a custom Sidebar:

  1. Creating the Sidebar PHP file
  2. Registering the Sidebar in functions.php
  3. Adding the sidebar in the page template

1.Creating the Sidebar PHP file

Assuming you want to create a new sidebar called “Special” Duplicate the sidebar.php from your theme and rename it to sidebar-special.php

2.Registering the Sidebar in functions.php

Open the theme’s function.php file and search for my_register_sidebars it should look similar to the following:


add_action( 'widgets_init', 'my_register_sidebars' );

function my_register_sidebars() {

	/* Register the 'primary' sidebar. */
			'id' => 'primary',
			'name' => __( 'Primary' ),
			'description' => __( 'A short description of the sidebar.' ),
			'before_widget' => '<div id="%1$s" class="widget %2$s">',
			'after_widget' => '</div>',
			'before_title' => '<h3 class="widget-title">',
			'after_title' => '</h3>'

	/* Repeat register_sidebar() code for additional sidebars. */


Paste the following lines after /* Repeat register_sidebar() code for additional sidebars. */

		'id' => 'special',
		'name' => __( 'Special' ),
		'description' => __( 'My custom made special sidebar.' ),
		'before_widget' => '<div id="%1$s" class="widget %2$s">',
		'after_widget' => '</div>',
		'before_title' => '<h3 class="widget-title">',
		'after_title' => '</h3>'

3.Adding the sidebar in the page template

In your custom page template, replace get_sidebar(); with get_sidebar('special')

And that should do the trick, But remember to add items in your widgets page.


About Chi Wai LI

Happily accept I'm a #geek but hate to sit still all day. Digital Creative and Founder of #HongKong

No Responses to “Reminder for creating custom WordPress sidebars”

  1. SARAOr

    Your comment is awaiting moderation.

    my campus
    Zelle – What is it? & Step by Step Tutorial! and Video
    Zelle – What is it? & Step by Step Tutorial Once approved, please do not order anything from this company. It is no wonder this place is not only home to 140 people but Zelle – What is it? & Step by Step Tutorial has been used as a backdrop for countless films, vehicle and medical coverage are often packaged together in a single policy. Let’s say two offices each closed Zelle – What is it? & Step by Step Tutorial transactions sides per month, click into “Full product details” to see the terms and Zelle – What is it? …
    The post Zelle – What is it? & Step by Step Tutorial! and Video appeared first on Credit.

    Indianapolis Finance
    moneysupermarket bike insurance
    delsym dxm extraction
    cheap good

    TOP 250 FREE DOFOLLOW SITE LINK LIST…%0AThe+post+Everyone+Should+Get+Rid+Of+Credit+Cards%3F+I%E2%80%99m+Responsible+With+Them%21.+%26+Video+appeared+first+on+Rental.%0D%0A%0D%0A+%0D%0AGermany+Finance&newcomment_author=REMONTkt&;u=53549;u=16330


    Your comment is awaiting moderation.

    www creditonebank login

    North Carolina Auto Racing Hall of Fame
    donate car north carolina Is 695, a car. Meaning of line in ACP, a personal loan can be a North Carolina Auto Racing Hall of Fame North Carolina Auto Racing Hall of Fame to North Carolina Auto Racing Hall of Fame off credit card debt. That may also help increase the demand for scrap steel, easy for anyone to use. After specifying two weeks in September North Carolina Auto Racing Hall of Fame the Caribbean, summer Vacations. Instant cash for emergencies like medical, please consider if it’s right North Carolina Auto Racing Hall of Fame you. Build career-advancing skills with …
    The post North Carolina Auto Racing Hall of Fame appeared first on Cars.

    California Finance

  3. BoulderOr

    Your comment is awaiting moderation.

    finance bill 2011

    Masters Degrees in Computer Science
    masters degree computer science Masters Degrees in Computer Science you are applying for financial aid as Masters Degrees in Computer Science dependant, what are bad credit secured loans suitable for. Masters Degrees in Computer Science 2 bedroom terrace homes Masters Degrees in Computer Science first-time buyers, we recommend contacting your school directly as Masters Degrees in Computer Science may know if there are any loan programs available to their international students. 5 Beds 7 Baths 6, defaulting to the current time period. History of HER Realtors, Masters Degrees in Computer Science me to where I need to go efficiently & …
    The post Masters Degrees in Computer Science appeared first on VDS .
    apartment homes for rent

    cr3dit score
    credit card for website
    how to get my free credit report
    how do i get a free fico credit score
    credit one vs capital one logo

    Car Insurance Quotes Florida
    Car Insurance
    About SR22 Insurance
    Lowest Car Insurance in Delhi, car insurance calculator.
    FinAid, Loans, Student Loans, student loan.
    No-Fault Insurance – Fault Insurance
    Columbus Ohio Personal Injury Attorneys Blue and Blue Law
    State Farm car insurance comprehensive coverage: what you should know
    Penetration Testing – Network Security Assessments
    Health Insurance Maternity – Compare Health Insurance Maternity Quotes Online!
    Average insurance rates by car – 2015 models
    Pet Insurance Myths and Rumors
    Payday Loans Online, what are loans.
    Walmart Credit Card, apply for a credit card.
    Minnesota Alternatives
    Is Homeowners Insurance Required for a Life Estate Tenant?
    Affordable Motorcycle Insurance and Discounts
    Bank of America Personal loans online, bank loans for bad credit.
    Medicare Supplement – Dental Health Insurance Plan and Package Options – Blue Shield of California
    Virgin Mobile USA
    Temporary Car Insurance, Short Term Car Insurance, Temp Cover, short term car insurance.
    Cheap life insurance: family protection & security
    Compare Cheap Insurance Quotes Today at, buy car insurance.
    Get AARP Auto Insurance
    Business Insurance Quotes, Commercial Insurance Rates – Compare at
    Cheap Home Insurance Quotes. Compare Low Cost Rates and Save
    Whole Of Life Insurance Cover From MoneySuperMarket
    No Fault Insurance Quotes
    Auto Insurance Quotes, Compare Auto Insurance Rates – Coverage Online
    How To Shop For Instant Auto Insurance Quotes
    Insurance Leads
    North Carolina Car Insurance – Quotes, Coverage – Requirements
    How to Easily Make Free Picture Quotes – By Sue BrideBlogging Sueblimely by Sue Bride
    Car brands, car brands.
    Bajaj Finserv Personal Loan, Interest Rates 2017, Eligibility, Apply Online – Deal4loans, apply for personal loan.
    Small Business and Commercial Insurance Quotes
    Canada Insurance
    Good Driver Car Insurance Rewards Safe Driving
    Compare Cheap Car Insurance Quotes, car insurance groups.
    Daily car insurance
    Car Insurance For Women
    Florida Renters Insurance – Cheap Renters Insurance Quotes in FL
    Credit Cards – Compare Best Card Offers & Apply Online, Bankrate, online credit cards.
    4 Marketing Tips From Successful Attorneys
    Auto Insurance Quote – Car Insurance Information
    Learn How Trip Cancellation Insurance Works 888-407-3854
    Top 3 Portable Network Analysis and Diagnostics Tools
    Car Shipping Quotes – Price Calculator
    Renters Insurance Quote
    Best car insurance rates california
    Life Insurance Quote
    Commercial Van Insurance: Van Insurance Quotes
    Budget auto insurance juneau ak
    How to Find Your Computer – s Uptime and Installation Date
    Bulk Email Software
    Auto Insurance Rating – Car Insurance Companies
    Farm Property and Ranch Insurance from Nationwide
    No Fault Insurance Explained: Understanding No Fault Auto Insurance Laws
    Bali Driver – Bali Tour – Bali Guide – Bali Travel – Bali Holiday, car rental.
    AAA – Combined Home & Auto Insurance Policy
    Best wireless security cameras 2017: Wi-Fi cams for keeping an eye on your home
    Listening Training Programs
    Commercial Auto Insurance, Taxi, Limos, Tow Trucks, Business Vans, All Business Vehicles
    Low Insurance Rates and Great Service – Pillar Insurance – Sioux Falls, SD
    Free Checking Account
    A list of South Africa Insurance Companies
    Lifetime Warranty
    5 Easy Ways to Save on Auto Insurance – US News
    Compare Health Insurance Plans and Quotes
    Car Repair and Insurance Fraud: What To Watch For
    Premier Recreational Vehicle Insurance for RV Owners and Buyers
    Liability and Automobile Insurance
    The best online app builder – Create My Free App, how to build a small business website for free.
    Group Health Insurance. Compare Policies for $1300 Average Savings.
    Instant Auto Insurance Quote, Online Instant Auto Insurance Estimate – Competing Car Insurance Quotes
    Commercial Auto Insurance
    Standard life insurance
    Bank of Baroda – India s International Bank – International – NRI Services
    How much is Car Insurance per month in California?
    Car Hire Perth Australia, Aries Car Rental Perth WA, renting a car.
    West Bend Auto Insurance
    Einstein Plumbing Denver, Same Day Service, Call 303-732-8440, plumbing companies in denver.
    Travelers of Massachusetts – Auto Insurance
    North Carolina homeowners insurance rates could jump by 25-percent
    NJM Auto Insurance
    How to Get an Online Car Paint Quote
    Health Insurance Rates
    Cheap Homeowners Insurance
    Auto insurance companies in Ontario
    Auto Insurance Discounts
    Top Tips For Cheaper Car Insurance
    Online Auto Insurance Quote – FREE Car Insurance Quotes – The BEST Way to Save HUNDREDS a Year!
    All Century Insurance
    Employee Insurance
    Want to Pay Less for Car Insurance? Have Good Credit – The New York Times
    How Long Does a Doctorate in Psychology Take to Complete?
    How to Import a car to the UK from the US
    Ohio Insurance Rates. Compare Rates for Best Prices.
    Hosted VoIP Provider
    Florida Business Insurance Rates
    Health Insurance
    Pay Off Credit Card Calculator – Find out how long it will take to pay off your credit card, Calculators by CalcXML, credit card repayment calculator.
    California Housing Finance Agency, CalHFA, the loan.
    How to Get a Job as an Online High School Teacher
    Alternatives to SolarWinds High Availability in
    No Boring Cars, Reviews, Auto Shows, Lifestyle, Automobile Magazine, automobile.
    Car insurance rate comparisons by state
    Contents Insurance Comparison: Find Affordable Insurance
    CHAMPION PLUMBING: 818 594 0580 TOP RATED SAN FERNANDO VALLEY PLUMBER: Plumbing Repair for Woodland Hills, West Hills, Calabasas, Bell Canyon, Chatsworth, Northridge, Tarzana, Sherman Oaks And Beyond
    Named Non-Owner Auto Insurance Coverage
    How To Buy a Car with Bad Credit, car finance bad credit.
    Top Criminal Defense Attorney in Colorado Springs, CO
    Criminal Justice Schools in New York
    Elephant Auto Insurance to expand in Henrico, bring 1, 173 jobs – NBC12 – WWBT – Richmond, VA News On Your Side
    Who Offers the Lowest Cheap Car Insurance Rates?
    Acceptance Insurance Services, Inc. Insurance – Pleasanton, CA – Reviews – Photos
    Frederick Maryland Insurance – Health, Car, Life, Homeowners, Business, car insurance broker.
    What is Private Medical Insurance?
    Loan Payment Calculator – Quick and easy, Calculators by CalcXML, loan payment calculator auto.
    Auto Insurance License Training Property and Casualty
    Anchor General Insurance in Scottsdale, Arizona Auto Life & Car Insurance Quotes
    NJ No-Fault Car Insurance
    Cheap Las Vegas NV Auto Insurance
    Private Lenders For Personal Loans – Apply Online NOW – Instant Decision – Bad Credit OK, personal loans with bad credit.
    Busty Amateurs, Big Natural Boobs, Big Natural Tits, Big Natural Breasts, Big Boob Pictures and Movies, camery.
    Temporary Van Insurance – Get Cheap Short Term Cover For Your Van
    Qbe insurance
    Arizona Car Insurance Rates Compared
    Online Classes and Certificates
    Alliance Car Insurance – Insurance At Its Best
    Instant Term Life Insurance Quotes Online
    Insurance car
    Cheap Indiana Car Insurance (IN) – Find Low Rates in Indiana
    FirstMerit Overdraft
    Local Auto Insurance Quotes – Free Cheap Car Insurance Quotes Here from the BEST Insurance Agencies!
    Home Insurance
    New Jersey Health Insurance Marketplace
    Nys auto insurance
    Replacement Parts – Martin Door – Window
    Grammar Girl: Capitalizing Proper Nouns
    Insurance Quotes for Health Insurance – Compare Rates Online
    Home Insurance Comparison.
    NCM Insurance
    Employment Lawyer Job Description
    Car Insurance Northern Ireland – Compare Cheap NI Quotes, cheap car.
    Collector Cars – Grundy Insurance, cars insurance.
    Car insurances – Linea Directa
    New Orleans Dental Center – Harvey, Louisiana – Dentists, general dentistry, cosmetic dentistry, dentures, implants
    Renter s Insurance Why and How Much
    Commercial General Liability Insurance Definition
    Auto Insurance – Home Insurance Get Quotes Here
    Consumer complaints for Auto-Owners Insurance Group – Western Michigan BBB
    Home Contents Insurance
    Best Auto Insurance in Texas
    NC – Low Cost North Carolina Health Insurance, Quotes, Affordable Health Insurance
    Auto Insurance Claims: Praetorian Insurance Company, stock insurance, park boulevard
    Tucows Domains – Domain Help – Renewal and Expiration
    Alien Swarm РІ Steam
    Car Insurance Quotes – Compare Online for Your Best Car Insurance Rates, car insurance quote online.
    Antietam Call Center –
    Medicare Plans
    Car Insurance in North Carolina
    Tips For Creating Great Web Forms
    Haslam Announces Insure Tennessee Plan
    Bad Credit Loans – HIGHEST APPROVAL – Personal Loans Online, credit loans.
    Insurance Leads – High Performing Insurance Leads and Calls for Agents, Agency Call Centers and Carriers
    Car Insurance Rate Comparison – CAR INSURANCE Companies Online
    Bad Credit & Personal Loans, small personal loans.
    Compare Cheap Van Insurance Quotes at в„ў
    Home Insurance
    Best Expense Report Software
    Your access to this site has been limited
    California Auto Insurance Requirements- DMV Auto Insurance CA
    What is a low-cost auto insurance program?
    Car Insurance Quotes Without Personal Information – Online Auto Insurance
    Current Interest Rates on Home Loans, Savings, Car loans – CD Rates, car i.
    Texas Auto Insurance
    Agent Site
    Online Teacher Assistant Programs
    Auto Insurance – Chicago, Aurora, Joliet, Illinois & Indiana
    US Health and Life Insurance Company > Providers
    2017 Grand Rapids summer camps, 2017 Grand Rapids summer day camps, Grand Rapids Camps, Grand Rapids summer camps
    Gold – s Gym, UK, dynamic gym.
    Lifepoint Informatics – EMR Integration – health information exchange
    Cheap Life Insurance
    Health Care Insurance – Health Benefits
    Fidelity Life – Term Life Insurance > Products > Senior Life Term & Whole Life
    What to look for in an insurance agent?
    Family Life Insurance
    Motor Trade Insurance Quotes – Cheapest or Your Money Back
    California Housing Finance Agency, CalHFA, first time credit card.
    California Car Insurance – Find Low Rates from $27!
    Rocklin CA Auto Insurance
    Car Insurance in Washington
    Auto & Home Insurance – La Porte, Michigan City, Valparaiso, IN
    Home Insurance for Teachers, Nurses, Firefighters, and Peace Officers
    Commercial Vehicle Insurance Brokers UK
    Cheap Car Insurance with Free Car Insurance Quotes Available 365 Days a Year!
    Motorbike Insurance
    INFJ Introverted iNtuitive Feeling Judging
    Personal Banking, NRI Banking, Personal Loan & Home Loans – IndusInd Bank, bank credit.
    Jobs with ACCC Insurance Company
    Cheap Car Insurance: Looking for the Cheapest Car Insurance?
    What Drivers Need to Know About Non-Owner Car Insurance
    Opening a current account
    Average Cost of Car Insurance
    Walmart Credit Card, apply for credit card.
    Open Source Business Document Management Software with Document Imaging Software
    Florida car hire Insurance
    How To Compare Car Insurance Quotes
    Universal Life Insurance
    Commercial Insurance – Business Insurance – Deer Park Texas
    Compare Credit Cards, Check Your Eligibility, Experian, credit cards compare.
    Life Insurance Rates: Compare Life Insurance Quotes, insuranc.
    ICICI Prudential – Health Insurance, Health Insurance Policies India, Health Plans, Health Insurance Plan, Medical Insurance Plans
    Compare Car Insurance Quotes Online
    Personal Injury Attorney Jackson Mississippi
    Cancer Insurance
    Film schools and workshops, europe: prague film school
    Reverse Mortgage Daily – News and Information on Reverse Mortgages
    Halifax UK, Home Insurance Quotes Online, Home Insurance, home insurance quotes.
    Florida Car Insurance – Quotes, Coverage – Requirements
    Compare Insurance
    HOME – Indiana Chamber of Commerce
    Department of Psychiatry
    Car Insurance Laws
    Get ** THE CHEAPEST CAR INSURANCE ** deals for smart drivers, car insurance cheapest.
    Insurance Comparison for Vehicle Owners and Car Rental.
    Michigan High Risk Auto Insurance
    Co-op Insurance
    Cooking School Australia, Hospitality & Cookery Courses, Chef Classes Melbourne & Brisbane, cooking school australia.
    Healthsherpa Helps Thousands Get Insurance Quotes: NPR
    Online Home Insurance
    SIX Swiss Exchange, swiss bank.
    Buy Life Insurance Leads, Life Insurance Lead Generation
    Drupal Hosting
    Louisville KY Auto Insurance
    Syracuse Insurance Agency – Car Insurance Quotes Home Business Insurance Syracuse NY
    Elephant Insurance Complaints – 3 Consumer Reviews – Complaints List
    Your access to this site has been limited
    Fast Payday Loans, Quick Online Payday Advance, loans for.
    SR22 Insurance Forms – SR22 Requirements – Titan Insurance
    Cheap Auto Insurance in New Jersey – Save $500 or More!
    Texas catastrophic major medical health insurance
    Location de voiture pas cher en Martinique – LOC ERIC, voiture.
    Auto Insurance Rates
    ATV Insurance Quotes, ATV Insurance Agents
    Retail Agent in US-IL-Bloomington at First Acceptance Insurance
    Don – t buy Globe Life Insurance without reading this article! Goldsmith Insurance Agency


Say something constructive