Tell us what you are trying to do?
I am trying to assign a content template to a page.
I have created a custom post type (Doctors).
I have created custom fields for this post type.
I have created a view (Doctors) with search filters and a content template with block editor.
I have created a homepage with elementor. I am using toolset view and selected to display only the filters.
I have created a page (find a doctor) to display both the filters and search results.
Everything worked perfectly at this point.
Then, I created a template in Elementor (Single, post type doctors).
After that, I needed to change the data type of 2 custom fields, so I removed and recreated those 2 custom fields (specialty and city, which were strings and recreated as drop down selections) and I updated my filer settings in views.
After that, the page hidden link (which was supposed to display both the filer and the results) is empty.
The content template for this view was automatically named loop-item-in-doctors-3. However, this option is not available to the content template selection in page edit.
I also tried to rename the content template with no luck.
I am using Astra pro + Elementror Pro + Toolset Types + Toolset Views + WPML
What I am trying to do is to display the filer and the results at the page hidden link
What is the link to your site?
hidden link password: kostas124
Hello and thank you for contacting the Toolset support.
What about creating a new view for the page? Maybe a filter in the view is not correct any more after recreating the custom fields.
When you say The content template for this view was automatically named loop-item-in-doctors-3. However, this option is not available to the content template selection in page edit.
Do you mean from the Elementor Pro template or on the Toolset View? Which template or view?
Would you allow me temporary access to check this further? Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Hello Kostas,
The issue was caused by an assigned content template to the page "Find a doctor". The page was assigned to "Loop item in Doctors 2". I fixed the issue by setting the content template to "None". This way, Elementor will take charge of the rendering of the page.
Note, that a content template can be assigned to a custom post type or per post. "Template for Pages" is now assigned to pages. Every page will use it to render the content. Except pages that have different values(now Find a doctor has a different value, none).
We can't choose the content template "loop-item-in-doctors-3" because it is now assigned to the loop of the view Doctors. We won't need it for a page.
I hope this helps. Let me know if you have any questions.
Hi Jamal,
Thank you very much for your reply, the structure and use of views' templates is clear to me now.
The only issue is that the editing of this view is gone. I have no problem to rebuild it, but I am wondering how this happened, in order to prevent it in the future.
Thanks & Regards,
Kostas
Can you explain more what do you mean by "The only issue is that the editing of this view is gone"?
Do you mean the view "Doctors"?
Can you share a screenshot or a screencast?
Unfortunately, I don't have a screenshot of how the page was originally edited. Just to give you an idea, each doctor was in a separate line, the "Read More" link was a button, ect
I see. I do not know what you have used previously to edit the content template inside the view "Loop item in Doctors 3". I edited it to wrap it inside a bootstrap row:
<div class="row">
Content here
</div>
I have also used a class attribute on the read more link to generate it with a class, then we can use a custom css to style the link:
.read-more {
/* styles here */
}
I hope this helps. Let me know your feedback
Hi Jamal,
I will work it our regarding the editing.
By the way, I can see several templates in Toolset > Content Templates (See attached screenshot), many of which I can not even delete. Also, the only template which is actually used (Loop item in Doctors 3) is not there!
I am a bit confused regarding the management of the content templates. Am I missing something?
According to your screenshots, three content templates are assigned, they will be automatically used by Toolset:
- Content template for Doctors: will be used in doctors archives (/doctor/)
- Template for Doctors: will be used for doctors single page (/doctor/slug-of-doctor)
- Template for Pages: will be used for pages.
The other content templates are not assigned, and will only be used by other views/content templates.
The content templates that are not deletable or editable on the list, are so because they were created with the block editor from another context(page, view, content template), they should be edited there.
I don't know why "Loop item in Doctors 3" does not appear on the list. I tried to log in to check but the server is returning an error.