I have a strange empty <p> tag that only shows up in the first two loops of a view when working with a content template block in the loop content.
hidden link
Tried all sorts of things (like rebuilding the content template from scratch) but the only thing that worked was placing the content directly rather than through a loop template. If I put the blocks right inside the loop, the <p> tag is gone!
hidden link
I work with "Container as Link", but disabling this function does not affect the p-tag
The problem is not related to the theme, also under "Twenty Twenty-One"
Maybe I have a similar problem with another page that only shows the first two images in the English translation. Also, working with templates in the loop content but placing the loop content directly instead of a content template block did not fix the problem.
hidden link
They are ok in the German version (original language)
hidden link
hidden link
has a directory protection toolset:support66 <- please delete!!
Hi,
Thank you for contacting us and I'd be happy to assist.
Whenever, post body or loop's content is shown using a content template, certain formatting filters are applied to it. When the same content is passed through those filters repeatedly (through the nesting of templates into one another), it increases the risk of over-processing. This is why it is better to avoid the nesting of templates, whenever possible.
For example, the page "Leitungsteam (with template in view)" has the view "rd-view-mitarbeiter-leitung-with-template" in the body content. In this view, the loop's item is being shown using the content template "view-container-zustaendiger-mitarbeiter".
If it is absolutely necessary to show the loop item's content using a content template, you can replace the "content template" block with a "Fields and Text" block and load the same content template using the shortcode:
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-body )
[wpv-post-body view_template="view-container-zustaendiger-mitarbeiter" suppress_filters="true"]
The use of suppress_filters="true" attribute reduces the content filters applied to the template's output.
( screenshot: hidden link )
You'll note that this approach has fixed the extra P tags added on the page "Leitungsteam (with template in view)".
I hope this helps and you can use the same strategy on other pages with similar issues, as well.
regards,
Waqar
Hello Waqar,
Thx for the info and the fix.
Over the past year I have really tried to meet my needs with the block editor, but kept running into one problem after another, so I decided to go back to the legacy editor on this project.
Thx for your help,
Torsten