Taxonomy Field Order

Support General Taxonomy Field OrderResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #43375
    LogLog
    Participant

    Hi,

    I have a simple taxonomy field named "Grade Level" with the following choices:

    <ul>
    	<li>Pre-K</li>
    	<li>Elementary</li>
    	<li>Middle School</li>
    	<li>High School</li>
    	<li>Post Secondary</li>
    </ul>

    This field is being displayed as a checkbox list. In the checkbox list the choices are being ordered by title, alphabetically ascending, so the order is incorrect:

    <ul style="list-style-type:square">
    	<li>Elementary</li>
    	<li>High School</li>
    	<li>Middle School</li>
    	<li>Post Secondary</li>
    	<li>Pre-K</li>
    </ul>

    How can I order by ID instead? Thank you.

    #43376
    LogLog
    Participant

    Also, is it possible to edit my support forum posts? I don't see how to do that and I would like to fix my HTML typo.

    #43380
    PeterPeter
    Moderator

    Hello,

    You can use the setting query_args and parameter orderby to order taxonomies by ID. Screenshot https://monosnap.com/file/hW4TW9dFDL0vVhupFJpFTWbPmPey1U

    Refer documentation https://docs.metabox.io/fields/taxonomy/

    #43386
    LogLog
    Participant

    Thank you, Peter. This worked. I actually did try orderby with value ID before asking here, but now I realized I mistakenly put it in Custom settings instead of Query args.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.