WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to show all my post taxonomies on the left side of the web page in such a way that when a person click on it the post can be displayed according to the taxonomies.is there anyway to display them and i also want to add some style in it.

share|improve this question
up vote 0 down vote accepted

You can build a list using two functions: get_terms() and get_term_link():

function wpse73271_get_term_archive_link_list( $taxonomy ) {
    // First, get an array of term IDs
    $term_objects = get_terms( $taxonomy );

    // Now, loop through $term_ids and get
    // an array of term archive permalinks
    foreach ( $term_objects as $term_object ) {
        $term_object->url = get_term_link( $term_object, $taxonomy );
        $term_object->permalink = '<a href="' . $term_object->url . '">' . $term_object->name . '</a>';

    // Now, build an HTML list of permalinks:
    $output = '<ul>';
    foreach ( $term_objects as $term_object ) {
        $output .= '<li>' . $term_object->permalink . '</li>';
    $output .= '</ul>';

    // Now return the output
    return $output;
share|improve this answer
thanks it will help me alot – FAWAZ Nov 20 '12 at 12:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.