WordPress.org

Ready to get started?Download WordPress

Forums

Tag order (3 posts)

  1. Rics1983
    Member
    Posted 2 years ago #

    Hello!
    I set some custom post type with their custom taxonomies, both hierarchical and not.
    There's a way to get the "tag" like taxonomy ('hierarchical' => false) to be ordered by the "adding"?

    I mean:
    I enter B to the tag list, and then i enter A to the tag list.
    WP will show them in an alphabetic order ignoring which term i've inserted first.
    So i will have on the front page A and then B.

    But i've entered B before A and i would like to have them show in the order like i entered them: B and then A.

    Is that possibile in a someway?

    Thank you!

  2. keesiemeijer
    moderator
    Posted 2 years ago #

  3. Rics1983
    Member
    Posted 2 years ago #

    Thank you, it's useful, i've set to B value=1 and to A value=2, so now i have listed B and then A.

    I would to know if there's a more elegant solution using some function to place into functions.php instead of using a full plugin.
    But i'm afraid that there isn't, I've checked the "terms" wp table and excluding the classic alphabetic sort order, i don't see other values that could be taken to make a different ordering like the one that i would see.
    Probably to obtain what i need, some data must be stored when saving a post. (Not to the taxonomy!!! Explain follow)

    Infact, the problem using this plugin and set a value to a tag, is that if you have a post where tag B must be placed before tag A and then another post where you need the same tag A before the same tag B, you will have only one of these two solutions working, not both, because you have a unique value for the tags.

    It would be cool to have an "order by tag saving sequence", the first tag inserted on a post will be show as the first, the second tag as the second and so on.

    Maybe is something so deeply into the root of wp that could not be obtained.

Topic Closed

This topic has been closed to new replies.

About this Topic