Skip to content

Instantly share code, notes, and snippets.

@rahularyan
Created June 19, 2014 03:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahularyan/f84742c8eac0f36fd9ca to your computer and use it in GitHub Desktop.
Save rahularyan/f84742c8eac0f36fd9ca to your computer and use it in GitHub Desktop.
Add custom widget positions in qawork
<?php
// register position name
qw_apply_filter('widget_positions', 'qw_register_widget_positions');
function qw_register_widget_positions($positions){
$new_positions = array(
'My Custom Position' => 'Below header',
'My Custom Footer' => 'Custom footer position',
);
return array_merge($positions, $new_positions);
}
// add position in theme layer, or use theme layer action
if($this->qw_position_active('My Custom Position') ){
$this->output('<div class="custom-position-outer"><div class="container">');
$this->qw_position('My Custom Position');
$this->output('</div></div>');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment