Re: alphabetizing php array in WordPress ?

Subject: Re: alphabetizing php array in WordPress ?
From: Tony Chung <tonyc -at- tonychung -dot- ca>
To: Monique Semp <monique -dot- semp -at- earthlink -dot- net>
Date: Fri, 8 Jun 2012 08:49:14 -0700

Hi Monique,

Don't roll your own. Use the get_tags() function's built in orderby parameter:

http://codex.wordpress.org/Function_Reference/get_tags

Example in the forum
http://wordpress.org/support/topic/wrong-tagcloud-sort-order

-Tony



On 2012-06-08, at 8:28 AM, Monique Semp <monique -dot- semp -at- earthlink -dot- net> wrote:

> Hello, writers,
>
> Not a writing question per se, but from recent discussions I know that there are quite a few WordPress folks on this list, so perhaps someone can help.
>
> I’m working on my website portfolio (yes, you’ve been hearing about it for some time, but it’s almost done :-), and have tagged all my doc pages, and have a tag cloud that displays most wonderfully (using the Ultimate Tag Cloud plugin). And I also have manually coded a sidebar widget so that when you click a tag and get a page of matching doc posts, the list of all the tags in the matching posts is also displayed.
>
> I got the looping to work (so that I get all the doc posts’ tags), got rid of the duplicates, but for some reason cannot sort the resultant array of tags into alphabetical order. It seems a simple matter to use the sort() php function, but it just does nothing... No errors are generated, but the array remains ordered doc-by-doc, minus the duplicates.
>
> Any suggestions?
>
> -Monique

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Create and publish documentation through multiple channels with Doc-To-Help. Choose your authoring formats and get any output you may need.

Try Doc-To-Help, now with MS SharePoint integration, free for 30-days.

http://bit.ly/doc-to-help

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You are currently subscribed to TECHWR-L as archive -at- web -dot- techwr-l -dot- com -dot-

To unsubscribe send a blank email to
techwr-l-leave -at- lists -dot- techwr-l -dot- com


Send administrative questions to admin -at- techwr-l -dot- com -dot- Visit
http://www.techwhirl.com/email-discussion-groups/ for more resources and info.

Looking for articles on Technical Communications? Head over to our online magazine at http://techwhirl.com

Looking for the archived Techwr-l email discussions? Search our public email archives @ http://techwr-l.com/archives


Follow-Ups:

References:
alphabetizing php array in WordPress ?: From: Monique Semp

Previous by Author: Re: OT: LinkedIn Hacked
Next by Author: Re: What's wrong with this headline?
Previous by Thread: alphabetizing php array in WordPress ?
Next by Thread: Re: alphabetizing php array in WordPress ?


What this post helpful? Share it with friends and colleagues:


Sponsored Ads