Skip Navigation

[Résolu] Add view in template

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

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

Last updated by Dido Il y a 7 années et 5 mois.

Assigned support staff: Adriano.

Auteur
Publications
#212305

Hi, I made a view for a slider. I want to show this in the header of my theme. How can I add this to my header.php? I tryed this, but doesn't work.
<?php echo render_view(array("name" => "Slider header")); ?>

#212335

Dear Dido,

First I would recommend you to test using a default wordpress theme and with no extra plugins enabled, maybe something is breaking our function.

Also, you should enable the debugging mode. Check using new views debugger as well: wp-types.com/documentation/user-guides/debugging-types-and-views/

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

#212438

Hi Adriano, Nothing... no errors too, but the view is also not recognized by the debugging function.

#212929

Hi Adriano, it was the code. it has to be this: <?php echo render_view(array("title" => "Slider header")); ?>