Skip Navigation

[Résolu] Field block that's displaying body of another post doesn't work

This support ticket is created Il y a 1 année et 11 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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)

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Luo Yang Il y a 1 année et 11 mois.

Assisté par: Luo Yang.

Auteur
Publications
#2515853
Screen Shot 2022-12-14 at 10.18.30 PM.png
Screen Shot 2022-12-14 at 10.21.51 PM.png
Screen Shot 2022-12-14 at 10.17.51 PM.png

I am trying to: nest the content of one page into another page.

Link to a page where the issue can be seen: lien caché

I expected to see: The content of the shipping page showing inside the shop policies page, just like it shows in the block editor.

Instead, I got: nothing on the front end.

Screenshots show the block settings on the back end and you can see that it's pulling in the shipping rate information in the block editor, but when I go to view it on the front end (incognito mode, all caches cleared and reset) and it just shows..... nothing.

#2516679

Hello,

It is not recommended to use single field block to render post content, please try to replace it with View shortcode [wpv-post-body], for example.

Replace the Single Field block you mentioned in screenshot with a shortcode block, and display below shortcode:
[wpv-post-body view_template="None" item=123]

Please replace 123 with the "shipping rate" post ID, and test again

More help:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-body

#2517423
Screen Shot 2022-12-16 at 8.43.28 PM.png

Hi Luo,

Using the wpv-post-body shortcode causes an error. There are a few older posts with that same error and there was never a fix for it.

As far as I can tell, the issue is that the main page (policies) uses a content template that contains a [wpv-post-body view_template="None"] shortcode and I can't nest them.... but there's no way to make a content template that renders the post body without it.

#2518487

You can not render post body shortcode in same post body content, you can only display another post body content. If you need more assistance for it, please provide a test site with the same problem, fill below private message box with website credentials, also point out the problem page URLs. I need a live website to test and debug.