Support » Plugin: Toolset Types - Custom Post Types, Custom Fields and Taxonomies » [Plugin: Types – Custom Fields and Custom Post Types Management] How to embed into a php template

  • Hey guys,
    I love the plugin, and am considering buying views, I think my clients will love it.

    But before I dive in, can someone explain how to call a field in a page template?
    I’ve used Types to add a few custom fields, or taxonomies… Groups in Types I guess… to WP pages. The result is a fantastic set of WYSIWYG editors and image uploaders! but how do I put them in the template?

    I imagine it’s something like getting custom fields (a la Codex) but to be honest I’m lost.
    For example, I’ve got an image field:
    field name: Banner Image
    field slug: bannerimg
    How would I call this in the page-section.php page template file?

    Thanks guys,
    ~ Dr. Peril

    http://wordpress.org/extend/plugins/types/

Viewing 5 replies - 1 through 5 (of 5 total)
  • So I thought I should clarify, I saw the Functions section of the documentation, but
    types_render_field("my-numeric", $parameters)
    isn’t really doing it, I keep getting warnings (luckily not errors), does anyone have an in–use example I can take a look at?
    Thanks,
    Dr. Peril

    Plugin Author Amir Helzer

    (@amirhelzer)

    Can you paste here what you’re putting into $parameters and what warnings you’re getting?

    When you say “isn’t really doing it”, what are you getting in the output?

    Hi,
    Your plugin is awesome! but I don’t want to use short-code like [types field=”price”] so I’ve installed embedded ver. Now, how will I be able to call it from the theme page?

    Say I want to use it in index.php So, what should I write?
    <?php types_render_field(“price”, $parameters); ?> is not working..

    I’m really need your help.

    Thanks

    Plugin Author Amir Helzer

    (@amirhelzer)

    The $parameters argument should be an array.

    You need to call something like:
    <?php types_render_field(“price”, array(‘raw’=>’false’)); ?>

    The ‘array’ argument should include a list of all the arguments that you want to pass to the function. Have a look at this page for a complete list of all fields and their functions.

    Types Fields API

    Thanks a million!!!

    http://wp-types.com/documentation/functions/ page is updated too 🙂

    thanks again

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Types – Custom Fields and Custom Post Types Management] How to embed into a php template’ is closed to new replies.