Skip Navigation

[Resolved] Add Toolset view on existing template

This support ticket is created 3 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 3 voices.

Last updated by Minesh 3 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#2287957

Tell us what you are trying to do?
Hi I'm using WP Event Manager plugin to handle some of my events. Through Toolset I created a relationship (many to many) with the Posts thinking that an Event might correlate with several Posts. This relationship works great in the backend, however, it misses the front-end part. For example, when visiting an Event the user should see the related Posts (manually selected). The WP Event Manager plugin offers a quite beautiful template to present each Event and I was wondering if I can append to this template a Toolset view to present just a single table with the related Posts without creating everything from the beginning.

Thank you in advance

#2288067

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paris,

Thank you for getting in touch.

This is possible to do if you were to modify the template itself that the plugin is using to render the template for the events.

When I did a check on my end with the same plugin, I found the template at Plugin -> Plugin Editor -> WP Event Calendar-> Templates -> content-single-event_listing.php

If you were to modify this template then you could append the view to the template but your changes will be lost anytime the plugin is updated.
You can use the function below to render the view using the php template.
https://toolset.com/documentation/programmer-reference/views-api/#render_view

Please let me know if this helps.
Thanks,
Shane

#2294133

Hi Shane, yes this did the trick! Thank you very much!

#2295249

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Shane is on Vacation. This is Minesh here and I'll take care of this ticket. Hope this is OK.

It seems Shane already shred the solution and its working for you. You are welcome to close this ticket and please open a new ticket with every question you may have.