Is there a way (plugin, or something else) to set it where there is a drop down on the “New Post” page that allows you to choose a post type and the fields change allowing you to filter what content you are putting into a post without confusing a user by having 20 different custom fields on the “New Post” page.
Also, is there a plugin or other that can make custom fields with different value types (textarea, list, file upload, etc)?
This was asked over and over:
Newâ page
and if you are not into coding the you can use plugins like
hope this helps
I understand your concern; if you get a lot of post types WordPress’ admin menu quickly grows unwieldy. What I’ve done for you is to implement something like what you asked for. It creates a post edit page metabox for the new post page with a drop down list of custom post types like this:
And here’s what it looks like with a bunch of custom post types in the drop down mode:
What it does is use jQuery and Javascript to modify
window.location.href
in the browser’s DOM upon selection using one of the following URL patterns, using the post types in my list of screenshots as an example:One thing I worry about is the usability of this, however, so I wrote it to disable the drop down after the user modifies the value of any input field. That way the user can’t accidently loose everything they were working on.
The code follows and you can place this in your theme’s
functions.php
file or in a.php
file for a plugin that you might be writing:So there’s the code and it should work for you. If you have any questions about specifics in the code, just ask. However I would recommend you instead consider a consolidated menu like this one instead since I think it creates a more consistent mental model for the user, but the choice is yours!