#43770 closed enhancement (invalid)
accept 'menu_order' for 'orderby' get_sites() argument
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 5.1 |
| Component: | Networks and Sites | Keywords: | |
| Focuses: | multisite | Cc: |
Description
Trying to show a list of sites in a multisite network with get_sites(), using 'menu_order' for the 'orderby' argument does not have any effect (sites are instead ordered by id).
Upon further investigation it appears that 'menu_order' is not one of the accepted options for 'orderby' (per codex page for get_sites()).
Plugins like Intuitive Custom Post Order allow re-ordering of sites, and indeed there is a menu_order column in the wp_blogs table with the correct order.
I would like to propose adding 'menu_order' as an accepted option for the 'orderby' argument of get_sites().
Would this be possible?
Change History (5)
#2
@
8 years ago
Welcome to Trac! Thanks for your report.
I agree with @earnjam. This is indeed something that the plugin should be attending to and not core.
#3
@
8 years ago
- Resolution set to wontfix
- Status changed from new to closed
@earnjam @soulseekah Thank you gentlemen, I had not realized the menu_order column was added by Intuitive Custom Post Order Plugin, and I agree that in this case it would best be handled by that plugin. I will look into what filters are available. Thank you for your time. Cheers!
There is not a
menu_ordercolumn onwp_blogsby default. That column is something that the Intuitive Custom Post Order plugin adds.So unless we modify the db schema, then we can't do this in core. This feels like a niche situation to me and probably best left to plugins to execute.