WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

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

If i put multiple tags in a post then after publishing the post all tags are auto arranged by Character Serial, like A B C D... any idea if i wish to have all tags will not sorted or arranged by Character serial.... so, first tag will be first and last tag will be placed at last... though the first tag may be start with Z and the last tag start with A .. So what is the way to keep tag serial static as i have put?

share|improve this question

You can use wp_get_post_terms to achieve this. The third argument for this function supports an orderby parameter which defaults to name i.e. to sort alphabetically by name

$args = array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'all');
// orderby also supports 'count', 'slug', 'term_group', 'term_order', and 'term_id'

The first 2 arguments of that function may be left as default

share|improve this answer
thanks for your reply .. so where i should edit the code? – Hasan Nov 14 '12 at 12:58
In your template files, where the tags are being displayed. – Mridul Aggarwal Nov 14 '12 at 13:02
is that tag.php ? – Hasan Nov 14 '12 at 13:41
no, the file responsible for the output where you're seeing the posts & their tags. This totally depends on the theme – Mridul Aggarwal Nov 14 '12 at 13:44

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.