Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. <?php $taxonomy = 'categories'; $tax_terms = get_terms($taxonomy); ?>
  2. <ul>
  3. <?php foreach ($tax_terms as $tax_term) {
  4. echo '<li>' . '<a href="' . esc_attr(get_term_link($tax_term, $taxonomy)) . '" title="' . sprintf( __( "View all posts in %s" ), $tax_term->name ) . '" ' . '>' . $tax_term->name.'</a></li>';
  5. }?></ul>
  6.  
  7. <?php
  8. $taxonomy = 'categories';
  9. $tax_terms = get_terms($taxonomy);
  10. ?>
  11. <ul>
  12. <?php
  13. foreach ($tax_terms as $tax_term)
  14. if ('archive' !== $tax_term->name)
  15. echo '<li>' . '<a href="' . esc_attr(get_term_link($tax_term, $taxonomy)) . '" title="' . sprintf( __( "View all posts in %s" ), $tax_term->name ) . '" ' . '>' . $tax_term->name.'</a></li>';
  16. ?>
  17. </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement