Skip to content

Function Reference: horizon_get_taxonomy_list

Joe McKie edited this page Jul 31, 2013 · 1 revision

Description

Returns an array for all terms in a given taxonomy.

Usage

<?php horizon_get_taxonomy_list( $taxonomy ); ?>

Parameters

$taxonomy
  (string) (required) The taxonomy to retrieve terms from.
    Default: None

Return values

(array)
  An associative array for all the terms found in the given taxonomy.
    Format: Taxonomy name => Taxonomy Slug

Example

$terms = horizon_get_taxonomy_list( 'category' );

echo '<select>';
foreach($terms as $term => $slug) {
  echo "<option value='$slug'>$term</option>";
}
echo '</select>';

This will print a dropdown list of all available terms in the taxonomy.

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