Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.