Use ksort
($projectsByYear)
Of course every time you add something to the array it will need to be resorted.
Related Posts:
- visually sort ordering “custom post types” for end users
- Custom Table Column Sortable by Taxonomy Query
- How do I allow users to sort posts? [duplicate]
- Sorting results from JSON-API on custom fields
- Sort users in get_users() in custom order
- Sort by custom field value
- How to sort posts with the first 2 or 3 by latest, and the rest is random?
- Get “wp_get_nav_menu_items” to sort alphabetically [duplicate]
- Ascending sort order for monthly & category view, i.e. ?m=201204, ?cat=4
- Adding Sorting to Website?
- Sorting by tag or category
- get_terms orderby name as numbers
- Creating a category page by alphabet
- Sort a custom post type array numerically
- Sorting get_post_ancestors array
- wordpress custom_meta ordering of timestamps
- Multi-level ordering in WordPress
- Sorting for custom column in WordPress admin post table
- Help alphabetically sorting $terms from get terms(‘wpsc_product_category’
- Vertical alphabetically post columns
- Advanced custom fields sort repeater by date
- Use pre_get_posts to sort meta_key by an array of values
- Displaying posts sorting by a custom criterion
- Sorting custom post type by usermeta
- Sort posts by meta key that is serialised with other meta keys
- orderby field – list of available options?
- User Query sort on custom field then name
- WP Query sort by meta value
- Best Practices for a Completely Customizable Homepage – without plugins
- Sort alphabetically by custom field
- Sorting posts by custom field value
- How do I create a sort capability by Title, Category, Author, Date?
- how to get post order by post id wp_query?
- How to avoid duplicating same meta_value?
- Sorting/Filter posts from front-end in WordPress blog
- ‘sort_column’ => ‘menu_order’ not working
- Sort scheduled posts in ascending order by default
- How to sort by number
- change order of images attached to post
- sort items by randomness
- inner foreach loop sorting
- Sortby parameter to sort users
- Update meta_key value for a page
- Sort my event calendar by date
- Sort query_terms_list for post_tags alphabetically
- Table Sorter sort by span title?
- make two custom columns sortables
- How to display remaining post ( in post__in ) if posts are less then post per page?
- ACF pro: Group teaser by datepicker year and display custom sub fields [closed]
- Sorting in WP_List_Table class
- Sorting Posts by Taxonomy thats not within the query’s $args
- Sort an array with an ACF meta key
- Merge arrays and order set and subset as one
- display wordpress user who published a pending post of another user
- Static front page and orderby
- Advanced sorting of content in wordpress [closed]
- Sort posts by first content letter
- How to sort a WP_Query array by post_name after an array_merge();
- Grouping posts starting with same letter
- Getshopped (WP-e-commerce): show all protucts on one admin page for drag-and-drop ordering [closed]
- Sort Posts with custom meta key by default which is currently set as optional
- Sort Posts Alphabetically by Multiple Categories [duplicate]
- List CPT by menu_order with children right after parent
- How can users sort multiple pages?
- How do i Sort my Posts
- How to resort my id in wordpress?
- posts_results filter – additional sort, with a meta value, to move posts to the end of the results, with pagination working
- Sort Featured Content by Order instead of ID
- Can the Next/Prev Post links be ordered by menu order or by a meta key?
- How to extract data from a post meta serialized array?
- Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
- Sort results by name & asc order on Archive.php
- WP Cron Doesn’t Execute When Time Elapses
- How do I set the default admin sort order for a custom post type to a custom column?
- How to get permalink and title from post ID?
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- Fetch array with $wpdb
- Make custom column sortable
- How to store widget fields data as an array?
- Sort pages in loop by admin’s page attributes order field?
- How to Change Order of Posts in Admin?
- Orderby meta_value only returns posts that have existing meta_key
- Using meta_query, how can i filter by a custom field and order by another one?
- Sort admin menu items
- ORDER BY custom field value
- getting attachement images src and add classes
- Insert new element to array with add_filter
- Sorting: custom query with orderby meta_value_num THEN by title
- How to query_posts using meta_query to orderby meta_key AND have a secondary sort by date?
- Nice way to print_r arrays
- group search results by post type?
- register_post_type sort order by title by default
- Random sort within an already sorted query
- Different post sort order within different categories
- sort child pages on admin
- Why does get_users suddenly return duplicates?
- Order by & include array by specific post ids
- Get list of all registered post types slugs
- get_pages() not ordering as it should
- Can I query custom meta data through WP_Query