php - List wordpress categories by alphabet -
On the category store page, I want to list all the categories so that it looks like this:
"a"
- --- Apple
- --- Answer
"b"
< Ul>--- Ball --- Big And so on.
This is WordPress I You can retrieve your list of categories. / Code> function You can pass several parameters in the function, to specify which you want to use, except for other things, can give it. It should look something like this: For more information on using parameter values and returned categories, see the Wordpress codex. get_categories ()
$ defaults = array ('type' = & gt; 'post', 'child_of' = & gt; 0, 'orderby '= & Gt;' name ',' command '= & gt;' ASC ',' hide_empty '= & gt;;', 'Include =>,' number '= & gt ;,' pad_counts' = & Gt; wrong) ;; '$ Categories = get_categories ($ default);
Comments
Post a Comment