Skip to content

Commit

Permalink
replace title with post_title in menu_order
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Sep 29, 2023
1 parent 1bce7ff commit e3cf23d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simple-page-ordering.php
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ public static function sort_by_order_link( $views ) {
$class = ( get_query_var( 'orderby' ) === 'menu_order title' ) ? 'current' : '';
$query_string = remove_query_arg( array( 'orderby', 'order' ) );
if ( ! is_post_type_hierarchical( get_post_type() ) ) {
$query_string = add_query_arg( 'orderby', 'menu_order title', $query_string );
$query_string = add_query_arg( 'orderby', 'menu_order post_title', $query_string );
$query_string = add_query_arg( 'order', 'asc', $query_string );
}
$views['byorder'] = sprintf( '<a href="%s" class="%s">%s</a>', esc_url( $query_string ), $class, __( 'Sort by Order', 'simple-page-ordering' ) );
Expand Down

0 comments on commit e3cf23d

Please sign in to comment.