I am wondering why this code just won't work.. I am frustrated about it. It creates the tabs, but doesn't render the custom fields (types).

    echo do_shortcode('[xt_tabs_button]'.' 

        do_shortcode([xt_tab title="Informatie"] (types_render_field("informatie", array("output"=>"html"))); [/xt_tab]);
        do_shortcode([xt_tab title="Spelregels"] (types_render_field("spelregels", array("output"=>"html"))); [/xt_tab]);


How can I make this code work?

  • Please try to add more detail. I don't think this is answerable as-is. – s_ha_dum Feb 23 '13 at 16:38

Are you sure that you are supposed to nest the shortcodes like this?

If the following is going to work depends on how the plugin you use handles nested shortcodes.

    echo do_shortcode('[xt_tabs_button]
    [xt_tab title="Informatie"] (types_render_field("informatie", array("output"=>"html"))); [/xt_tab]
    [xt_tab title="Spelregels"] (types_render_field("spelregels", array("output"=>"html"))); [/xt_tab]

Do you have the docs for this plugin available? The (types_render_field("informatie", array("output"=>"html")));also doesn't look quite right.

  • Hee, thanks for helping, unfortunately your code won't work either. It still creates the tabs and those work! but it won't render the custom field, while normally this code works. Here the API information on the Types plugin. wp-types.com/documentation/functions/… – Dylan D Feb 23 '13 at 13:16
  • I've got it working! Now have to find out how to render the HTML code. I found that I could use shortcodes to render the custom fields to, and putting those in the code instead of the '(types_render_field..)' code works. – Dylan D Feb 23 '13 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.