Skip Navigation

[Résolu] How can I display repeating cpt in one page?

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Marqué : 

This topic contains 4 réponses, has 2 voix.

Last updated by Dido Il y a 9 années et 1 mois.

Assigned support staff: Caridad.


I have a question about this page:
hidden link

I made cpt for adding employes (medewerkers in dutch) in this company. You can see an example here:
hidden link

how can I get them like in this image:
hidden link ???


Dear Dido,

You need to create a View for employees and set the View Layout to Grid with 2 columns. Next you can add the Content Template you have as a field in that View.

Finally, this View you created needs to be inserted as a shortcode in this page content:
hidden link

Please let me know if there is anything else that I can assist you with.



Hi Caridad,

I have activated Views now because I was not using it yet but it seems very complicated to me.
I made a view template with this code

<div class="face">
<?php echo(types_render_field("email", array("class"=>"mail"))); ?>
<?php echo(types_render_field("pasfoto", array("class"=>"pas", "alt"=>"$titel", "title"=>"$titel",
"width"=>"70","height"=>"92"))); ?>
<?php echo(types_render_field("naam", array("class"=>"naam"))); ?>
<?php echo(types_render_field("functie", array("class"=>"functie"))); ?>
<?php echo(types_render_field("functie-b", array())); ?>

and this is what it looks hidden link
What is the next step?


Dear Dido,

You cant use PHP in a Content Template, just HTML and shortcodes. Lets try and do this in two steps:

1) Create a View (not a Content Template) that will list medeworkers. For now just add the field "title with a link".
Insert this view into this page by clicking the V icon: hidden link
This is a generic guide for doing this:

2) As a second step, you can customize the look a bit more by replacing the "title with a link" in your View with a Content Template.
This View template would have shortcodes to display the picture, the name, the title and the email.
This is a general guide for this part:

Please let me know if there is anything else that I can assist you with.



Thank you, I do now understand this a little better. It works.

Kind regards,

Le forum ‘Types Community Support’ est fermé à de nouveaux sujets et réponses.