0
votes

in WP admin how to add the custom field template plugin to a theme page?

it automatically shows in posts and pages but i want this in the theme page. the theme am using is from iwak "creations" portfolio page.

what files do i need to modify to add this?

2

2 Answers

1
votes

It's very hard to say what you need to modify without being able to look at the code. Being a premium theme, we can't just download it and take a look.

Having said that, the theme may use the WordPress custom post type functionality. Search the code for a call to the register_post_type function. If it's used, you may be in luck. Either

  • add 'custom-fields' to the supports argument in that call, or
  • call add_post_type_support after the post type is registered. The $post_type parameter will be the first value passed to the register_post_type function, and the $supports parameter will be 'custom-fields'.
1
votes

Daniel, are you using this Custom Post Type Plugin - http://wordpress.org/extend/plugins/custom-field-template/screenshots/? I've used it before, and the guy who created it is Japanese, so his personal page isn't very useful as far as support for english goes.

I had some trouble with this at first. But what I think you're trying to do is add the custom fields to your new pages you've created, correct?

It's not very straightforward, but once it works it's pretty awesome.

Basically, when you set up the plugin you create these different "Custom fields," right? Well part of that should look like this:

[Custom Field Name]
type = textarea
rows = 4
cols = 40
tinyMCE = true
htmlEditor = true

Ok, so once you've created those "Custom fields" keep note of the part in brackets. You'll add this to your template pages:

<?php getCustomField('Custom Field Name'); ?>

Now when you enter the info in the pages or posts, the content should appear as you've entered it.