Jump to content


Photo
- - - - -

WordPress Custom Taxonomy Output


  • Please log in to reply
3 replies to this topic

#1 roothost

roothost

    Is there anybody alivvvvveee out there?

  • Privileged
  • PipPipPipPipPip
  • 1,900 posts
  • Gender:Male
  • Location:Lewes, East Sussex
  • Experience:Advanced
  • Area of Expertise:Entrepreneur

Posted 15 March 2012 - 02:52 PM

I am having a right nightmare today! Created some custom taxonomies and have them outputting on a page like this;

<?php
if (get_the_terms($post->ID, 'esca')) {
  $taxonomy_ar = get_the_terms($post->ID, 'esca');

  $output = '<ul>';
  foreach ($taxonomy_ar as $taxonomy_term) {
    $output .= '<li>'. $taxonomy_term->name .'</li>';
  }
  $output .= '</ul>';

  echo $output;
}
?>

Problem being that after they appear to be displaying in either numerical or alphabetical order, and not in the order that I add them from the WP dashboard.

Anybody have any clever or obvious answers?? :aggressive:


#2 roothost

roothost

    Is there anybody alivvvvveee out there?

  • Privileged
  • PipPipPipPipPip
  • 1,900 posts
  • Gender:Male
  • Location:Lewes, East Sussex
  • Experience:Advanced
  • Area of Expertise:Entrepreneur

Posted 15 March 2012 - 04:51 PM

Cough Cough


#3 user-removed

user-removed

    Forum Newcomer

  • Validating
  • Pip
  • 0 posts
  • Gender:Not Telling
  • Experience:Nothing
  • Area of Expertise:Nothing

Posted 15 March 2012 - 04:56 PM

As far as I'm aware, by default they order by publication date. There must be something in your theme or setup that is changing this default behaviour.

Checked your functions.php? Tried removing it? Tried the script on Twenty11?


#4 roothost

roothost

    Is there anybody alivvvvveee out there?

  • Privileged
  • PipPipPipPipPip
  • 1,900 posts
  • Gender:Male
  • Location:Lewes, East Sussex
  • Experience:Advanced
  • Area of Expertise:Entrepreneur

Posted 15 March 2012 - 08:23 PM

Yup, tried that. Tried a clean install of wp on anew domain using twenty11. It seems the default is to display in alphabetical order





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users