I built these pages for my site more than a year ago and they've looked fine, up until a few weeks ago. Now suddenly there is a lot of extra white space. I have not made any CSS or template changes in more than six months, well before the white space issue began occurring.
I cannot even edit the content template. When I try to do so, I get the error message: "This template includes Types single-ended shortcodes. Please close all Types shortcodes to avoid processing errors."
I have never had this error message before and have changed content templates many times (albeit more than a year ago). So there are two issues:
1. I cannot update the content template.
2. The white space suddenly appeared and I do not know what caused this.
The issue is happening on pages such as this one: hidden link
This is where extra white space is suddenly showing:
* Before the first book in the loop (on this page, the white space is after the line that ends "reading the latter").
* Before the buttons that follow each book (ex: the Amazon and Indiebound buttons).
Any help would be greatly appreciated.
Hello and thank you for contacting the Toolset support.
From what I can see on the page, there are some empty paragraph tags, and a new line in the generated HTML code. The theme's has also a margin-bottom applied to all paragraphs. I will need to check how the content template is built before making any conclusion. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Hello and my apologies for the late reply, but I do not work on Wednesdays and Thursdays. I worked on these issues yesterday, but I could not find the real issue until now.
Regarding the error when updating the content template, I think that you have fixed it, because I did not encounter it. All types shortcodes need to have an enclosing tag [/types]:
Regarding the white spaces, I fixed the first one by adding the output="raw" argument to the shortcode. Because the field is a WYSIWYG field, it will get the <p> tags wrapped around each line. And you have already wrapped the shortcode inside <b> tag. Which becomes incorrect. <b> tags can't wrap <p> tags. The reverse can be done.
<b>[types field='country-intro' output="raw"][/types]</b>
Regarding the white spaces before the Amazon and IndieBound links, there was an issue inside the first conditional that breaks this. I changed the condition from:
[wpv-conditional if="'[types field="book-recommender" item="@recommender-book.parent"][/types]' ne '' "]
To:
[wpv-conditional if="( $(wpcf-book-recommender).item(@recommender-book.parent) ne '' )"]
And, it fixed the issue.
Can you check from your side and confirm that these issues were fixed.
My issue is resolved now. Just curious how this happened, since the site looked fine up until a few weeks ago and I haven't made any changes?