Skip to content

Action Reference: horizon_get_options

Joe McKie edited this page Jul 31, 2013 · 2 revisions

Description

horizon_get_options is an action triggered alongside the init hook. It builds an array of all options used in your theme into the variable $options.

For this hook to work, your option names must follow the following naming structure - THEME_SHORT_NAME."_options_YOUR_OPTION_NAME". This will then be accessible with $options['YOUR_OPTION_NAME'];

Return values

(array) $options
  An associative array of theme options.
    Format: $option_name => $option_value

Description

Outputs the HTML of a selected dynamic sidebar. For use in functions and templates where dynamic_sidebar() would output incorrectly.

Usage

<?php echo horizon_get_dynamic_sidebar( $sidebar ); ?>

Parameters

$sidebar
  (string) (required) The sidebar name.
    Default: None

Example

<div class="twelve columns">
  <?php echo horizon_get_dynamic_sidebar( 'Footer 1' ); ?>
</div>

This will output the HTML contents of the sidebar named 'Footer 1' into the container.

Clone this wiki locally