I forgot to add !is_admin()
check to my pre_get_posts
function. Altered section of code below.
add_action( 'pre_get_posts', 'mpe_portfolio_sort_order');
function mpe_portfolio_sort_order($query){
if(is_archive() && ! is_admin() ):
$query->set( 'order', 'ASC' );
$query->set( 'orderby', 'menu_order' );
endif;
};
Related Posts:
- Manage Columns : order by post_parent’s title
- Add a custom meta box for client to order CPT posts how they want
- Adding ‘menu order’ column to custom post type admin screen
- Custom post type – order field
- Change the order of columns for a custom post type on the admin list page
- Displaying a custom post type alphabetically
- Order by & include array by specific post ids
- Sort Order for a Custom Query in a Post Type Archive Not Working
- Select All in Parent Category, Group by Child Category?
- How to Remove Certain Screen Options and Table Columns from post type in wp_list_table?
- Ordering posts having multiple post-meta date fields
- Add custom column at custom posts list
- Order Posts by Taxonomy and Meta Value
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- Custom Post type sort order not working in the admin area
- Best way to arrange custom post types by Attributes -> Order metabox value?
- Menu position (admin menu) of pages
- Order posts by (hierarchical custom) taxonomy terms and term children
- Compare 3 custom fields and sort by oldest
- List upcoming events, ordered by date in a custom field
- Custom page type – template under page attributes?
- ascending order custom post type
- WP_Query post at custom position
- Sort custom post types by last name in the backend
- query order by date on custom type: wrong order
- Taxonomy list. Order by a specific custom post type count
- WooCommerce – Show orders for a specific product ? [closed]
- Re-order posts in query after
- How to get a list of post types that “support” various things such as page-attributes?
- Display custom post types with custom date field value (before today) & order by custom date field
- Custom Post Type order by modified date and custom meta field issue
- Parent page using wp_dropdown_pages and multiple post types
- How to query different post types in specific order?
- How to quickly reorder posts in the admin panel that will persist for the wp-api
- How do I make a custom taxonomy for a CPT appear inbetween title and editor boxes?
- Combining sorted and random CPT
- Show listings from Impress Listing plugin in random order using taxonomy and terms
- I did group my search results by post type, but how can i give each of them its own order?
- Ordering posts in Search & taxonomy by post_meta
- Rewrite and custom post type: order by custom field not working
- How to set order for a custom post type
- Previous/Next Link by Meta Value in CPT
- How to order separated Custom Post Search results
- Wp_query: sort by PHP variable
- Allow user to set custom order to a list of custom taxonomies?
- Add Standard Page Attributes Metabox for Page Parent
- How to do WP_Query with two meta fields with orderby clause
- How to order WP_Query by parent for hierarchical Custom Post Type?
- How to order and group custom post type posts by year and month
- Order Custom Post Type by Custom Field Value
- Get the taxonomy of a post hierarchically
- Change sort order when using ‘orderby’ => ‘type’
- Display Woocommerce Orders for specific author [closed]
- How to use Custom Page Templates for hierarchical Custom Post Type
- Ordering custom post type by multiple custom fields
- Order by custom field meta_key date and then by custom file meta_key number
- Archive not sorting correctly
- 4 column-loop ordered alphabetically with entries grouped (and labeled) by their first letter
- Ascending Order is not Working in Custom Post Type Listining
- Set template for custom post type?
- Custom post type sorting: alphabetical order
- $wpdb->get_col and ORDER BY?
- Having Issue on Ordering CPT by Custom Field In Custom WP Query
- WP_Query of custom post type sorted by meta_key has unexpected results
- Using menu_position to add two entries between Dashboard and Posts
- WP_Query not resetting after wp_reset_postdata
- Post ordering not working with custom field
- Filtered by a custom field, ordered by another
- orderby parameter not working in custom query
- Adding Page Ordering to a Custom Page Type
- How to enable parent-child relationships and post attribute admin widget for posts
- Displaying Portfolio Filter by Category Order (alphabetically)
- show most viewed posts of last days by link?
- Changing WordPress sort order for returned child pages
- “Menu order” being ignored when querying posts from a parent taxonomy with “include_children” set to true
- custom filtering admin columns
- Order posts by taxonomy terms
- wp rest api orderby field in a custom table
- Display Parent-Child Posts in specific order by comparing IDs in array
- How can I sort the results of a REST API response by the title of a connected custom post type?
- Order posts alphabetically with numbers but some of the posts has numbers in the title
- Remove Header and style.css from Specific Post template
- How to order taxonomy terms by most recent post?
- Orderby if between two meta fields
- Display custom posts, ordered by most commented, without duplicates
- Custom post type order by post_title
- SEARCH QUERIES – REVERSE OUTPUT
- order custom post type posts by custom date
- How to order multiple custom post types with same taxonomy by date
- Wp Query sort order from custom MetaBox
- Using Orderby and meta_value to order natural/alphanumerical
- How to enable post types on Page Attributes?
- WordPress Custom Post Type – Post Attribute: Template. Template shows up and saves on the back end, but the default theme file is being rendered
- How to sort custom post’s category by id from the theme’s function.php?
- What’s the most efficient way to get two queries based on an if statement?
- Show first posts with custom field not empty and order all by title
- WP Query with multiple post types ordered by custom meta date then published date
- Orderby modified only for specific post types
- Custom post order when using OR relation
- Help ordering custom query by Title, Ascending