Skip Navigation

[Resolved] design template with WPBakery Page Builder

This support ticket is created 5 years, 10 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.

Our next available supporter will start replying to tickets in about 1.99 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 24 replies, has 2 voices.

Last updated by Nigel 5 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#1185916

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-01-17 at 12.41.27.png
Screenshot 2019-01-17 at 12.40.45.png

Thanks for that.

Editing the artista posts in the back end I can see that the individual posts do not have the artista template assigned (first screenshot).

If I edit the artista template and click change usage then I can see that it is assigned to the artista post type, but that 484 individual artista posts do not have the assignment recorded.

The most likely explanation is that when you created the artista template you unchecked the option to assign to existing posts.

In any case, you can bulk assign the template to the artista posts by clicking that Bind 484 Artistas button you can see in the screenshot.

#1186674

Thanks a lot by your help!
Now I can see correctly the fields for post types "obras" but I also need to show in that view the content of the post "Artista", so the final result must be a combined with the contain of post "Artista" and the fields for "Obras". The contain of the "Artistas" that I want to show is the contain of the post. Can you tell how can I do it?
Another question, I want modificate the design for the template "Artista-Plantilla", this template has the fields; año, fecha, medidas,... how can I hide the label of that field when the field is empty? I don´t want thaht in my template put "Año: " and the date is not show. Do I explain correctly?
Nuria.

#1186748

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Nuria

To summarise,

- you have a template for displaying the parent Artista. There the context for any fields you include is the artista post. If you want to include the post content of the artista, you would normally insert it here (using the wpv-post-body shortcode)
- in this template you inserted a View to display child obras of the parent artista. Within the Loop Output section of the View, the context for any fields you include is the current obra posts (i.e. the View iterates over the obra posts and outputs the fields for each obra).

If you want to include artista fields in the output of the obra View, you can do that by specifying the parent artista as the field source.

So, if you are inserting fields with the Fields and Views button, you will see a Post Selection tab which lets you specify a related post as the source for the field (and which will add an item="@relationship-slug.parent" attribute to the relevant shortcode).

Regarding not showing the label for an empty field, I just answered a similar question, if you could check this reply and see if you can follow that: https://toolset.com/forums/topic/empty-custom-fields/#post-1186681

#1189685
screencapture-macvac-ultimobyte-es-wp-admin-admin-php-2019-01-23-13_47_46.png

Hi Nigel,
Thank you by your support. I am going step by step...
Actually on my view I can see the contain of "Artista" and the differents "Obras" (hidden link) but my problem is thath the contain of "Artista" appears before each "obra" and I want thath the Artista contain post and the title "obras" only appears at the first of the page. Is it possible?

Another question: The conditionally empty for my fields is not working correctly, please I attached you and screenshot, could you make a view?

Thanks in advanced,
Nuria

#1189855

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-01-23 at 16.08.40.png

Hi Nuria

When I look at your site, I can see that the template for Artista posts contains the View listado-child-posts and nothing else.

It doesn't output any fields of the Artista, and yet this is where you should add such fields and content from the artista post that you want to display on an artista page.

But you have instead added content from the artista post inside the loop section of the View (by adding item="@artista_obra.parent" attributes to reference the parent artista post).

Anything inside the loop section (specifically, between the wpv-loop tags of the Loop Editor of the View) is repeated with each post that the View displays.

So this is the wrong place to display fields (including the post body) from the artista, unless there is some specific reason you want to output an artista field while showing an obra post.

You should put the content about the artista that you want to appear (once) in the template for artistas directly.

The conditionals to only display fields and labels if a field has a value is not working because in your conditions you are testing "wpcf-test-field" everywhere, but this is just a sample key used for demonstration, you must actually use the field keys of the custom field you are testing.

For example, to test a custom field "anno" you would need "wpcf-anno" as the key.

When using WPBakery you can use the "if" button to insert conditional shortcodes, which should generate the correct format (see screenshot).

#1190540
Screenshot_1.png
screencapture-macvac-ultimobyte-es-wp-admin-admin-php-2019-01-24-14_27_39.png
screencapture-macvac-ultimobyte-es-wp-admin-admin-php-2019-01-24-14_26_54.png

Hi Nigel,
I think I understand the structure of Toolset and I am really feeling at the end of my work. 🙂
I had been following your instructions of your last issue and my View has improve a lot, you can see it hidden link.
I have two questions that I have not resolve now:
1.- the name of the Artista, just following the title separator "obras" appears the name of the Artista. I can not localize where is it in my view and my tempalte. I attached you screenshots. Please, could you tell me how can I delete it?
2.- Just above the name of the Post title, there are a blank space. How can I put there a view of another Toolset template that I have with an alphabet taxonomy?. If a include the view in the template "Artista" the alphabet appears just then of the title and I want that appears before the post title. Is it possible?
Thanks in advacend
Nuria.

#1190904

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-01-25 at 07.34.56.png

Hi Nuria

1. the name of the Artista in that location is coming from the child View, where you have a wpv-post-title shortcode where it doesn't belong (unless you want it to appear there), see the screenshot.

2. I added a bit of text to your template for Artistas so that you can see where the content section that Toolset is able to control begins. Everything before that line is output by the theme, and to be able to modify the content there you would need to edit the theme files.

You can insert a View into a theme PHP template using the render_view function: https://toolset.com/documentation/programmer-reference/views-api/#render_view

#1190977

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Nuria

Another quick update just to say the issue with the custom theme page transition animation, our developers have determined there is nothing we can do on our part to fix it, and we have contacted the theme authors who are aware of the problem.

#1191899

Hi Nigel,
Thank you by your support!
I have hide the post-title shortcode from my View Artista, Thanks!!!!
About insert the View into my theme PHP template, I am not sure I can do it... I am going to try.
About the issue of the template, thanks for your information and please, let me know if there are any news.

#1192043

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, well, let me know how you get on editing your theme PHP files to insert the View, good luck.