Welcome to WebmasterWorld Guest from 54.145.136.73

Forum Moderators: coopster & jatar k

wordpress - show custom field only after a specific template selection

   
10:19 am on Apr 12, 2011 (gmt 0)

5+ Year Member



Hi,

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?

Thanks
3:49 pm on Apr 12, 2011 (gmt 0)

5+ Year Member



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)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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)

5+ Year Member



thanks friends.

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.

I hope it makes sense.

thanks
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month