Skip Navigation

[Resolved] Embedding Views Content Template within Elementor Single Template

This thread is resolved. Here is a description of the problem and solution.

Problem:

Seems to conflict with Elementor's Single Template and nothing is rendered in the content area. Is there a known conflict between Elementor Single Templates and Toolset Single Templates or am I missing some crucial step?

Solution:

Yes, there is a known conflict issue: Elementor PRO Template ShortCode does not render in content template.

There is a workaround for it, you can downgrade to old version of Views plugin 2.6.3.

Relevant Documentation:

This support ticket is created 6 years, 4 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by dashD 6 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#1135437

I am trying to create an output which combines the data within all the different Custom Fields within my Custom Post Type, so that it can be fed into the main content area of a page that is generated by the_content() function. In my case, I am using Elementor, which uses the Post Content Module to this. The issue I am facing is that all the documentation I have found refers to the "View Content Template" and there is no *clear* documentation on how to go about creating one.

For example, the following statement from Nigel at https://toolset.com/forums/topic/front-end-content-editing-forms-built-with-cred-embedding-in-elementor-single/#post-1090197:

"set up a Views Content Template to display single Jobs posts, which should include the edit link to edit the Jobs post"

I have already seen the following documentation:
https://toolset.com/documentation/user-guides/view-templates/
https://toolset.com/faq/whats-the-difference-between-a-view-and-a-view-template/

However I am still not clear how I go and actually create a "Views Content Template". I am also aware that loop templates get created in Views and I can attach a Content Template within a View, so is that what a "Views Content Template" is?

I am also aware that I can attach a Content Template to a Custom Post Type from the Toolset Dashboard using the "Create Template" option. So is that a "Views Content Template"?

I guess the main issue I have is that the Views Content Template gets referenced in documentation e.g. https://toolset.com/forums/topic/front-end-content-editing-forms-built-with-cred-embedding-in-elementor-single/#post-1090197 and https://toolset.com/forums/topic/layouts-views-content-template-layout-template/#post-618575 , but when I try to follow any of the above approaches to create a "Views Content Template" then the solutions suggested there do not work.

In my specific case, when I follow Nigel's excellent instructions at https://toolset.com/forums/topic/front-end-content-editing-forms-built-with-cred-embedding-in-elementor-single/#post-1090197 and then re-enable the Elementor Single Template for my Custom Post Type, the View Content Template that I have created using the Toolset > Dashboard > Create Template option (if that's how I am supposed to create it) seems to conflict with Elementor's Single Template and nothing is rendered in the content area. Is there a known conflict between Elementor Single Templates and Toolset Single Templates or am I missing some crucial step?

I have spent over 2 days trying to trouble-shoot this and learnt a lot in the bargain, but my main issue i.e. to embed a structured output containing multiple fields within an Elementor Single Template has remained unresolved. Finally, please don't point me to the help page that describes how to use dynamic fields within Elementor (https://toolset.com/documentation/user-guides/using-toolset-with-elementor-page-builder/create-templates-for-custom-post-types-with-elementor-and-toolset/), as that approach does not work for front end displays where I need to include an edit link to edit the post.

Looking forward to your help and also becoming a bit more wiser about what a "Views Content Template" actually is :).

#1135938

Hello,

Q1) what is "Views Content Template"?

The content template of Toolset Views plugin is for rendering data of one specific post, so you can use it for each single post, or each item in the view's loop, see our document:
https://toolset.com/documentation/user-guides/view-templates/

So in both cases you mentioned above, they are "content template".

Q2) Is there a known conflict between Elementor Single Templates and Toolset Single Templates or am I missing some crucial step?

Yes, there is a known conflict issue: Elementor PRO Template ShortCode does not render in content template, see similar thread:
https://toolset.com/forums/topic/view-issue/

Our developers are still working on it, and there isn't any ETA to fix it,

There is a workaround for it, you can downgrade to old version of Views plugin 2.6.3, you can download it here:
https://toolset.com/download/toolset-views/#changelog
If you are using lite version of Views plugin, please check here:
https://wpml.org/download/toolset-views-lite/?section=changelog

#1136135

Thanks Lou for clarifying what View Templates are. I am still unclear though what Nigel meant in his post at : https://toolset.com/forums/topic/front-end-content-editing-forms-built-with-cred-embedding-in-elementor-single/#post-1090197

"set up a Views Content Template to display single Jobs posts, which should include the edit link to edit the Jobs post"

Basically, he is suggesting that to display a collection of fields with an edit form link, we should be creating a Views Content Template that returns a single post. When I create a view, it tends to return all the records for that Custom Post Type. How to I get it to automatically pick up the Post ID of the current post and return just 1 record?

#1136525

You can follow our document to display the edit links:
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/

It will setup the edit link with post ID automatically.

#1136626

My issue is resolved now. Thank you!

If anyone else stumbles upon this, the issue was resolved by reverting back to version 2.6.3 of the Views plugin.

Also, the response from Lou and all the documentation, including the link that was provided, does not state with clarity what a "Views Content Template" is. So here goes... A Views content template is the content template that is "attached" to a custom post type (see Toolset>Dashboard > Front-end > Template column against the Custom Post Type). The documentation at https://toolset.com/documentation/user-guides/view-templates/ provides information about how to create a Views Content Template directly from Toolset > Content Templates, however the page is poorly titled as "Content Templates – WordPress Custom Page Template Without PHP" and a better title would have been "Views Content Templates – WordPress Custom Page Template Without PHP". As suggested on this page at the very bottom, Content Templates are embedded within Views and those are NOT Views Content Templates. Phew! Mystery solved.