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 get_categories ()

    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:

      $ 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);  

    For more information on using parameter values ​​and returned categories, see the Wordpress codex.


    Comments

    Popular posts from this blog

    python - Overriding the save method in Django ModelForm -

    html - CSS autoheight, but fit content to height of div -

    qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -