Dropcap Problem

Somewhere during the last couple of updates, I seem to have developed a problem when using the [dropcap] shortcode. Without the shortcode, paragraph spacing is fine but as soon as I add the shortcode there is an extra space inserted between the first and second paragraphs (see diagram).

I am using Renew on Pro.

Many thanks.

Hi @daveoxton,

Thanks for reaching out!

Would you mind sharing the page URL with dropcap and without dropcap shortcode? so that we can give you some idea on how to fix your issue.

Hope that helps.

Thank you.

Hi Marc,

I have set up two pages for you where the only difference between the two is the use of the dropcap shortcode.

WITH the dropcap: https://classictoast.com/dropcap-problem/

WITHOUT the dropcap: https://classictoast.com/no-dropcap/

Thanks for the help!

Hi @daveoxton,

I have compared two given pages and found that the content for the first section on the dropcap page comes out of the p tag and added a blank before selector inside the p tag, as shown in the second screenshot.

If you are still want to use the dropcap shortcode, you can add the following custom CSS code to Theme Options > CSS to remove that before selector.

.x-dropcap + p::before
{
    display: none !important;
}

Please remember that the above code will work if copied as it is and don’t conflict with any existing style.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We really do not provide support for custom codes that means we can’t fix it in case it conflicts with something on your site nor will we enhance it.

Thanks

Thanks very much for the reply and the CSS you have sent.

While this functions as a workaround, it does not solve the problem. For example, if I place a caption under the Featured Image or if I italicise the first paragraph then the CSS fails to work.

Surely the problem is within the dropcap shortcode, it used to work fine without this problem. This problem has only started during the last couple of updates. I have an old copy of Pro installed on localhost here and it works fine!

Furthermore, I am not asking for custom code which I understand is not covered by the scope of your support, I am merely asking for the dropcap shortcode from your theme to work the way it is meant to.

Thanks

Hello @daveoxton,

Please leave a blank space before adding the [dropcap] shortcode:

WordPress treats each shortcode as an independent element which is why you need to add a space before adding the shortcode so that WordPress will treat the shortcode as part of the paragraph.

Hope this makes sense.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.