How to display on Post? (4 posts)

  1. muffin1882
    Posted 3 years ago #

    Using this plugin (Types - Custom Fields and Custom Post Types Management) I want to set up a set of check boxes as "Specifications"

    For example on the "add new item" page I want a set of checkboxes for example;

    Metalic paint
    Electric windows
    Power steering
    air conditioning
    power steering

    I want to be able to select whatever checkboxes is applicable whilst adding my new item... which I have got working great.. But how do I display the selected checkboxes as a dotted list on my posts??

    I did try going to the plugin authors site but its appear to have some downtime..

    Please help.


  2. muffin1882
    Posted 3 years ago #

    Ok, I checked the types website today again and its now up for me... I see that to display items you need to use the following code;

    <?php echo(types_render_field("field-name", array("arg1"=>"val1","arg2"=>"val2"))); ?>

    Well I have added that and changed the field name to "specifications" because when I click on "Custom Fields" I can see a group there called "specifications" - inside this group are all the check boxes I want.

    I have tried a few different arguments to try displaying the selected check boxes on the post types but its just not displaying for me please help...

    The current code I'm using;

    <?php echo(types_render_field("specifications", array("raw"=>"true"))); ?>

  3. AmirHelzer
    Plugin Author

    Posted 3 years ago #

    This should be the name of the custom field, not the group.

  4. muffin1882
    Posted 3 years ago #

    Sorry for being a noob lol but does this mean that "custom fields" is all my checkbox names and that I would need to use the code for each single checkbox as opposed to a singular name for a group of checkboxes?? (if you know what i mean)

    I call the group "specifications" in this group I have around 20ish check boxes - I need the code to display (on the front-end) whatever checkboxes are ticked when adding a new post (in admin panel).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Types
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic