I’m using custom post types for a few pages where I have a very customized template…but I only need one of each post (maybe not the best way to go about this…but it’s built so I’d like to not have to change this).
Is there a way to remove the “Add New” link on the left side admin menu just so the user doesn’t keep making more than 1 version of this post?
I’m okay with the “Add new” inside the actual page as that seems a bit harder to find.
You can remove the ‘Add new’ submenu page like so:
A similar logic can be used to conditionally redirect users from the ‘add new’ page if they have already created a post.
This method would also support querying by post status (i.e. they can only have at most one published post).
Of course, the above only removes the link to the ‘add new’ page – it doesn’t actually stop them creating posts. Depending on what you are after, you could remove the ‘publish post’ capability when they have more than 1 post (they will still see the add new link, and could create drafts but they won’t be able to publish). If you do this you’ll need to add the capability back when they ‘unpublish’ their post.