HTML code in heading
-
I really like your plugin! But I don’t understand why you can’t use HTML code in headings. In my case, I would like to use the ® character in headings, which looks stupid without the necessary HTML code. Please help!
Thank you very much!
-
Hi @davidspeyer!
We don’t allow HTML codes to be in Headings, because HTML validators are not allowing to be any codes within h1, h2, etc. h tags, only the text. So a HTML code there would create an invalid code.
What I can suggest is, that you could use Text layer instead:
https://smartslider.helpscoutdocs.com/article/1832-text-layer
as within p tags you can have any codes.thanks a lot for your quick reply! Are you sure, that no HTML code is allowed within h tags? I couldn’t find any information about this. It also seems a bit pointless to me. If this is true, a correct representation of the ® sign in headlines would not be possible.
-
This reply was modified 5 years, 8 months ago by
wp_dsp.
If you go here you can make a test:
https://validator.w3.org/nu/#textareaEntering this code will give no errors or warnings:
<!DOCTYPE html> <html lang=""> <head> <title>Test</title> </head> <body> <h1>test</h1> </body> </html>But if you add some html code to the h1 tag, it will:
<!DOCTYPE html> <html lang=""> <head> <title>Test</title> </head> <body> <h1>test <div>html</div></h1> </body> </html>“Element div not allowed as child of element h1 in this context.”
Yes, but I am not talking about block level elements. I want to use inline elements such as
<sup>®</sup>Using inline elements in h tags will not throw any errors:
<!DOCTYPE html> <html lang=""> <head> <title>Test</title> </head> <body> <h1>Brand<sup>®</sup></h1> </body> </html>Hi @davidspeyer
On this forum we are only allowed to provide support for the Free version, but I just wanted to let you know that we also have a Pro version, where we had some extra animations for the text in the Heading Layer. And those are not compatible with HTML in the text either, I am sorry.
But as my colleague mentioned, if you would like to format a certain part of the text, then you should rather use the Text Layer:
https://smartslider.helpscoutdocs.com/article/1832-text-layer
as that accepts HTML, too.Best regards,
Laszlo.Ok, thanks for your help! Using the Text Layer is not an option, because I already created tons of Sliders with Headline Layers. To be honest, I don’t understand why this function is not integrated. I really love your plugin, but without the possibility to display the ® symbol
<sup>®</sup>or other inline elements correctly, the slider becomes a bit useless.Hi @davidspeyer
We considered your suggestions and we made some modifications in the codes of the Heading Layer. So starting from the next release the Heading Layer will accept a few inline HTML tags, specifically these:
<a> <span> <sub> <sup> <em> <i> <var> <cite> <b> <strong> <small> <bdo>
and their closing tags.If you don’t want to wait until the next release, then I uploaded the installer of our latest build here for you:
https://www.dropbox.com/s/wcv0z9x4p76z1dl/smart-slider3-wordpress-free-master.zip?dl=1
This build already contains these modifications. To install it you should go to your plugins list, delete you current Smart Slider 3 installation then install this .zip file at Plugins > Add new > Upload plugin.Once it is done, these HTML tags will work in the Heading Layer.
Best regards,
Laszlo.Thank you very much! I am going to wait for the next release but I am looking forward to it. Great support!
Best regards,
David -
This reply was modified 5 years, 8 months ago by
The topic ‘HTML code in heading’ is closed to new replies.