wordpress - show custom field only after a specific template selection
10:19 am on Apr 12, 2011 (gmt 0)
As the title says, I need to show the custom fields only when a specific template is selected by the admin.
Is there any work around available for this?
3:49 pm on Apr 12, 2011 (gmt 0)
I think you would do better getting an answer if you have a specific php coding question. Otherwise your question may be better directed to a wordpress forum.
5:04 pm on Apr 12, 2011 (gmt 0)
The only solution I found (and dug around a bit) was to hack the admin scripts, which is not a great idea since they push an upgrade like, once a month or so and you have to keep updating it. Wish I'd found a different solution or took time to write a plugin.
Might also look in the plugin repository, like I said, I couldn't find anything.
6:40 pm on Apr 12, 2011 (gmt 0)
well, to provide more detailed info and code on what I need, here is what I need to do.
I have developed a wordpress plugin, the plugin adds a meta box on page add/edit screen which shows a drop down list exactly like the Page Template drop down which is shown by default on wp admin.
My drop down adds some more templates which are resided in my own plugin's template folder.
My own templates actually need to show some specific custom fields which I know how to do that. But I need to show those custom fields only when user selects the template from my plugin's drop down list.