Skip Navigation

[Resolved] Problem with template (conditions)

This support ticket is created 3 years, 6 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: Africa/Casablanca (GMT+01:00)

This topic contains 3 replies, has 2 voices.

Last updated by Jamal 3 years, 6 months ago.

Assisted by: Jamal.

Author
Posts
#2092817
Screenshot_7.png
Screenshot_8.png

I need to create a custom content template with conditions (conditions - custom taxonomy). Everything works in a regular template (Screenshot_8.png). In a template with a custom taxonomy inference condition, the selection of the parent type and any parent fields does not work (Screenshot_7.png). This does not work for any type of block, just a paragraph can be taken as an example. That is, you cannot insert a parent field in a template with output conditions.
In addition, it is not possible to reset the template's terms of use, only edit . That is, if I select the output conditions once, I have to create a new template if my use plans have changed and I want one template for all taxonomies.

#2093283

Hello and thank you for contacting Toolset support.

Thank you for reporting this issue, I was able to reproduce it on a clean install, and I am reporting them to our 2nd Tier for further analysis.

However, there are a couple of workarounds that may be interesting for you. Each workaround is somehow limited but is at the same time very powerful. Please log in to my test site with the following URL hidden link

I have created the following:
- A custom post type "Portfolio" with a one-to-many relationship with the default post type "Posts".
- A content template assigned the default "Posts" type: hidden link
- A content template assigned the default "Posts" type, with a condition on a category: hidden link

I got the same results: Not being able to choose the parent post(Portfolio) on the second content template. But, I was able to work around it in two ways:
1st workaround: Using an "intermediary" content template: Let's say you want to display the title of the parent post using a Single Field block
- Create another content template assigned to the default "Posts" type, with a lower priority.
- Save the content template and reload it.
- Add a Single Field block inside of it and choose the parent post, then the title.
- Save the content template.
- Open the 2nd content template(with the condition on the category).
- Add a content template block(hidden link) and choose the last created template.

2nd workaround: Using Reusable blocks:
- Go to the 1st content template.
- Locate the block that you want to have the same on the second content template.
- Make it reusable. Check this screenshot hidden link
- Open the 2nd content template.
- Add the reusable block inside of it

You can see both these techniques in the 2nd content template hidden link
See it in action here hidden link
Check this screenshot hidden link

I hope this helps. Let me know if you have any questions.

#2093297

Thanks! I understood these solutions, I will try so far.

#2094217

This issue is now escalated to the developers to be handled in an upcoming release.

Let me know if you still need help with the workarounds.