To change the mode URL variable but in the load try this:
add_action( 'load-edit.php', 'my_default_posts_list_mode' );
function my_default_posts_list_mode() {
$post_type = isset( $_GET['post_type'] ) ? $_GET['post_type'] : '';
if ( $post_type && $post_type == 'my_post_type' && !isset( $_REQUEST['mode'] ) )
$_REQUEST['mode'] = 'excerpt';
}
Got the “insipration” from here: Set Default Listing “View” in Admin
Related Posts:
- Row actions for custom post types?
- How can I remove the “Add New” button in my custom post type?
- How do I filter the excerpt metabox description in admin?
- Best way to filter featured image text for a custom post type?
- Remove date and category filters when editing custom post types
- Remove “Get Shortlink” button in admin of custom post type
- Filter term taxonomy metabox in custom post type
- Filter hierarchical custom post type admin page by parent, and include children & grandchildren
- show most viewed posts of last days by link?
- Best way to fix bad count on All | Mine | Published
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- Add filter button to custom post type in admin area
- Change CPT Edit Target Link for Admin List
- Change the text on the Publish button
- remove custom post type permalink
- Register CPTs using Dashicons for admin menu icon in WP 3.8
- Sort search results by post type
- Remove “posts” from admin but show a custom post
- How to order posts of a custom post type by date DESC in dashboard Admin?
- How to change “Draft” string for status of custom post type to “Unavailable”?
- Add content in custom post type page after the title and before columns
- How to check if I’m on a custom post type archive in the admin area
- How can I get next/ previous post links to order by a filter (by the last word of the title)?
- Add content before/after admin post wp-list-table
- Most efficient way to search for values from CPT in Post content
- Filtering Posts by Multiple Taxonomy Terms such as in an Admin Post Listing?
- Title_save_pre – Simple problem that u know for sure
- Displaying Post Title on Post Edit page?
- Backend search; include CPT meta?
- Image size filtering in Media uploader according to custom post type
- Sort custom post types by last name in the backend
- Hooking into wp_export filter for custom post type [closed]
- Custom Post Row Actions
- Add text to post list/edit screens?
- Adding menu_order to CPT admin page
- Filter home_url for custom post type
- Add Content Exclusively to a Custom Post Type Feed
- How to make in WordPress admin panel sortable column for the custom field, that count the number of page impressions?
- How to make post sticky in the admin page?
- How do increase the amount of links shown down the left in the admin menu?
- Filtering WP_Query
- WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term
- Displaying custom taxonomy in the admin list of a custom post type
- How can I run this code once so that my generated post title doesn’t keep changing on publish/update?
- Custom Post List View: Page or something else?
- Addition of custom option panel crashes Media Library & Admin Area
- How to change the post type a theme shows by default?
- filter custom post in rest api with custom function
- Sort and filter custom post type posts by custom taxonomy
- manage_edit-{post_type}_sortable_columns sorts, but wrong!
- Loop filtering Custom Post Types and/or Categories
- How to use manage_$post_type_posts_columns with underscore in post type?
- Search filter triggered & sort by custom post type
- How to order posts of a custom post type by date DESC in dashboard Admin?
- How can I add a filter to a particular post format?
- Is there any way to get list of all possible filter hooks for all post types?
- Can I display custom post types in home.php or need page template?
- WordPress custom post type capabilities issue
- wp_insert_post wrong post type [closed]
- How can I remove filters from custom post types?
- Hide Status Option From WordPress Publish Metabox and Rename Published on:
- Custom posts of one type have disappeared from admin. Still appear on site [closed]
- How to get the custom post list to admin user edit page?
- how to retain the ability to modify the post slug after applying a post_type_link filter?
- How do I show a link or ‘Read More’ button on a custom field excerpt when it is less than the word limit
- How to filter url on post submission?
- Modify a plugin function output from another plugin
- Custom Taxonomy Filter Issues
- How to customize `Edit-Post` Screen
- Filter search posts by post meta?
- Modifying search results based on post_type
- Remove filter and view options from custom post type edit screen
- jQuery UI & Admin (Calendar)
- Change Text in Admin Panel
- conditional filter
- How can I put content before my custom post type default pages?
- get_posts() returns empty on custom post type /wp-admin/edit.php
- Why “Mine” is the default view when adding ‘capability_type’ in register_post_type
- How we can create menu from Appearance > Menu and use as a add-submenu-page for admin menu?
- Is there any filter to add a custom attribute to the tag in admin panel?
- Sort custom post column by generated value?
- Store a value in global scope after init hook is fired
- Filter posts by their related field’s custom field
- add_rewrite_tag broke permalinks that doesn’t use that specific tag
- Insert custom taxonomy into category query
- Group Custom Posts Types in a Relation field of ACF
- Help Adding filter to Add Media button for custom post type
- How to override post-new.php with custom template
- how it’s possible to show from a post of a custom post type the taxonomy/terms?
- Enable shortcodes on custom post type
- Creating adminable dynamic filtering on custom post type
- Menu disappears with custom post type link
- add current-menu-item to multiple custom post types
- using ACF datepicker to filter posts on a page
- Filtering in admin broken for custom post type in 3.8.1?
- Restrict a filter to a custom post type. Am I doing this right?
- Can WordPress show posts based on a button that the user clicked 2 pages back?
- Filter page ID outside the loop and order
- Paginate yearly archives for a custom post type
- coloring row’s background based on custom field value