Skip Navigation

[Resolved] Toolset_acces role code in accordeon result in extra whitespace around result.

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.

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/Karachi (GMT+05:00)

Author
Posts
#1204999
styling-accordeon.jpg

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 />
&nbsp;<br />
[wpv-conditional if="($(wpcf-bijzonderheden) )"]</p>
<p><strong>BIJZONDERHEDEN </strong>[types field='bijzonderheden'][/types][/wpv-conditional]<br />
&nbsp;</p>

#1205479

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

#1206459

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".