Archived topic
Problem in Page Headers after the last update
20 replies · Started by themedleb on November 15, 2017
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.
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.
Each page header is given a unique ID now, so you can target that ID in your CSS :)
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).
Can you please show me what are the HTML tags supported in the new release?
Everything 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 {
}
Okay, thank you.
No problem :)
I am having the same problem but, pretty strange, only on one page among many others where this html still works:
<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?)
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
Are you using <p1>? WordPress strips invalid HTML, which that would fall under.
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!
The 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>.
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 div
How to add css styles or div/span styles to page headers?
Can 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.