- This topic has 20 replies, 3 voices, and was last updated 6 years ago by
Tom.
-
AuthorPosts
-
November 15, 2017 at 10:06 pm #425588
themedleb
Hi there,
After I updated GP-Premium to the last version, a problem appeared in my Page Headers, all the CSS styles I made to the Page Headers disappeared because all custom HTML tags like <single-post-title></single-post-title> <comments-count></comments-count> … are removed and tried to add them many times but the problem persist.
Is there anything I’m missing?
Thank you.
November 15, 2017 at 10:08 pm #425589themedleb
After I saw this thread I understood the security reason behind this changes in the Page Headers, but didn’t understand how to style every element inside Page Headers using “Simple CSS” plugin since I can’t assign custom tags to each.
November 15, 2017 at 10:45 pm #425597Tom
Lead DeveloperLead DeveloperEach page header is given a unique ID now, so you can target that ID in your CSS 🙂
November 16, 2017 at 8:27 am #426044themedleb
Okay I noticed the unique ID, and I can customize some elements, but I can’t customize the others, like the title and shortcodes I inserted … It shows nothing to target (At least in the Google Chrome inspect tool).
November 16, 2017 at 8:29 am #426047themedleb
Can you please show me what are the HTML tags supported in the new release?
November 16, 2017 at 8:32 am #426050Tom
Lead DeveloperLead DeveloperEverything that is supported in the regular WP editor. So basically everything except PHP, scripts and style tags.
Since the ID is applied to the outer element, you can use it to target anything inside:
#page-header-100 .some-inner-element { }
November 16, 2017 at 9:29 am #426105themedleb
Okay, thank you.
November 16, 2017 at 1:37 pm #426291Tom
Lead DeveloperLead DeveloperNo problem 🙂
November 19, 2017 at 7:34 am #428166Mathias
I am having the same problem but, pretty strange, only on one page among many others where this html still works:
<p1>Headline</p1><br>
<p2>Subline</p2>On this one page here most of the code gets lost when changes are saved.
https://mygoal.de/trainingsplan-triathlon/
Why that? Why only there?
(p1, p2 is a custom css style that equals H1 H2 but shall not be recognized as headline by Google. But that is pretty equal here, isn‘t it?)
November 19, 2017 at 7:37 am #428170Mathias
Funny, even after copy and pasting it here, a part get‘s lost. Grrr
div style=”text-shadow: 0 0 10px #2d3638″
Please imagine there‘d be <> and the end of div marks after the whole string
November 19, 2017 at 9:29 am #428246Tom
Lead DeveloperLead DeveloperAre you using
<p1>
? WordPress strips invalid HTML, which that would fall under.November 19, 2017 at 9:48 am #428257Mathias
yes I Do, within a div container. The thing is, that it used to work and still works in 9 of 10 page headers. The same with div style html. What shall I do to define certain font styles for the page header? Thank you Tom!
November 19, 2017 at 9:56 am #428268Tom
Lead DeveloperLead DeveloperThe Page Header content is now sanitized before being added to the database. The sanitize process checks the content against a list of valid HTML elements. If the element isn’t valid, it will be stripped.
It’s also bad practice to use non-valid HTML elements on your site – I would definitely suggest using a proper element like
<p>
or<span>
.November 19, 2017 at 10:15 am #428282Mathias
Sorry, but I don‘t get this. I applied a div style around certain text. Neither div nor span works anymore. Syntax is:
open div style=”text-shadow: 0 0 10px #2d3638″
open for p1 (which is defined in CSS) TEXT close p1 br
end of divHow to add css styles or div/span styles to page headers?
November 19, 2017 at 10:26 am #428292Tom
Lead DeveloperLead DeveloperCan you post your actual HTML? To prevent it from being stripped in the forum, highlight it once pasted and click the “code” button above the editor.
-
AuthorPosts
- You must be logged in to reply to this topic.