Wordpress: create a custom sidebar / any zone for widgets

/ Published in: PHP
Save to your folder(s)

Cut-and-paste the following into your functions.php file (inside of your theme folder).

Change the Name-goes-here to whatever you want.

Copy this code and paste it in your HTML
  1. register_sidebar(array(
  2. 'name' => 'Name-goes-here',
  3. 'description' => 'Description goes here',
  4. 'before_title' => 'HTML before the sidebar goes here',
  5. 'after_title' => 'HTML after the sidebar goes here'
  6. ));

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.