I can’t seem to figure out how to change the default view for “Pages” in the admin menu.
The initial view is the “Pages” view (/wp-admin/edit.php?post_type=page
)
How could it change this to something else?
Like “Add New Page”? (/wp-admin/post-new.php?post_type=page
)
I’ve tried several different options including rebuilding the menu with a custom menu, but it seems like WordPress automatically keeps redirecting the “Pages” view (/wp-admin/edit.php?post_type=page
).
[Update]
Answer rewritten, based on this other Q&A.
To achieve this:
Use this code:
In a custom plugin, use this PHP to remove the Pages page.
This will need customizing, but it takes care of removing the original and replacing it with yours.
A different way of doing this is to add your custom query variable into the loading of the page.