-
Notifications
You must be signed in to change notification settings - Fork 11
Function Reference: horizon_get_taxonomy_list
Joe McKie edited this page Jul 31, 2013
·
1 revision
Returns an array for all terms in a given taxonomy.
<?php horizon_get_taxonomy_list( $taxonomy ); ?>
$taxonomy (string) (required) The taxonomy to retrieve terms from. Default: None
(array) An associative array for all the terms found in the given taxonomy. Format: Taxonomy name => Taxonomy Slug
$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.
Outputs the HTML of a selected dynamic sidebar. For use in functions and templates where dynamic_sidebar()
would output incorrectly.
<?php echo horizon_get_dynamic_sidebar( $sidebar ); ?>
$sidebar (string) (required) The sidebar name. Default: None
<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.