I am trying to: place a line of text based on toolset_acces role without surrounding whitespace.
Link to a page where the issue can be seen: website is in maintenance mode
I expected to see: no extra whitespace between upper and lower line of text.
Instead, I got: large empty space between lines of text, see image.
The code i use in the visual field in the accordeon:
<p><strong>Kunstenaar:</strong> [wpv-post-link item="@werk-in-de-collectie.parent"]<br />
<strong>Titel:</strong> [types field='titel'][/types]<br />
<strong>Huurprijs:</strong> € [types field='huurprijs'][/types]<br />
[toolset_access role="Guest" operator="allow"]<a href="linktosubscriberform">Om de verkoopprijs te bekijken dient u zich eerst te registreren op onze website</a>[/toolset_access]<br />
[toolset_access role="Administrator,Editor,Author,Contributor,Subscriber,Customer,Shop Manager,Abonnee" operator="allow"]<strong>Verkoopprijs:</strong> € [types field='verkoopprijs' format='FIELD_VALUE'][/types],-[/toolset_access]<br />
<strong>Techniek:</strong> [types field='techniek'][/types]<br />
<strong>Jaar:</strong> [types field='jaar'][/types]<br />
<strong>Beeldmaat (hxb):</strong> [types field='beeldmaat-hoogte-in-cm'][/types] x [types field='beeldmaat-breedte-in-cm'][/types] cm<br />
<strong>Lijstmaat (hxb):</strong> [types field='lijstmaat-hoogte-in-cm'][/types] x [types field='lijstmaat-breedte-in-cm'][/types] cm<br />
<strong>Status:</strong> [types field='status'][/types]<br />
<br />
[wpv-conditional if="($(wpcf-bijzonderheden) )"]</p>
<p><strong>BIJZONDERHEDEN </strong>[types field='bijzonderheden'][/types][/wpv-conditional]<br />
</p>
Hi there,
Thank you for contacting us and I'll be happy to assist.
To remove the extra spaces from around the output from the "toolset_acces" shortcode, you can follow these steps:
1. You can include the raw="true" attribute in the "toolset_acces" shortcode so that the automatic formatting of WordPress is not applied to the text inside it and it is not wrapped inside the <p>...</p> tags.
2. You can move the <br /> tags which are at the end of shortcode lines inside it, because they result in an extra line, whether a visitor can see the message or not.
With these changes, your lines with the shortcode would change from:
[toolset_access role="Guest" operator="allow"]<a href="linktosubscriberform">Om de verkoopprijs te bekijken dient u zich eerst te registreren op onze website</a>[/toolset_access]<br />
[toolset_access role="Administrator,Editor,Author,Contributor,Subscriber,Customer,Shop Manager,Abonnee" operator="allow"]<strong>Verkoopprijs:</strong> € [types field='verkoopprijs' format='FIELD_VALUE'][/types],-[/toolset_access]<br />
To:
[toolset_access role="Guest" operator="allow" raw="true"]<a href="linktosubscriberform">Om de verkoopprijs te bekijken dient u zich eerst te registreren op onze website</a><br />[/toolset_access]
[toolset_access role="Administrator,Editor,Author,Contributor,Subscriber,Customer,Shop Manager,Abonnee" operator="allow" raw="true"]<strong>Verkoopprijs:</strong> € [types field='verkoopprijs' format='FIELD_VALUE'][/types],-<br />[/toolset_access]
I hope this helps and please let me know how it goes.
regards,
Waqar
Many thanks Waqar, that did the trick, styling looks okay now, the extra thing i had to do was to mark the checkbox "Disable automatic paragraphs".