[Resolved] Problem in Page Headers after the last update

Home Forums Support Problem in Page Headers after the last update

  • This topic has 20 replies, 3 voices, and was last updated 3 years ago by Tom.
Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #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.

    GeneratePress 1.4
    GP Premium 1.5.3
    #425589
    themedleb

    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.

    #425597
    Tom
    Lead Developer
    Lead Developer

    Each page header is given a unique ID now, so you can target that ID in your CSS 🙂

    #426044
    themedleb

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

    #426047
    themedleb

    Can you please show me what are the HTML tags supported in the new release?

    #426050
    Tom
    Lead Developer
    Lead Developer

    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 {
    
    }
    #426105
    themedleb

    Okay, thank you.

    #426291
    Tom
    Lead Developer
    Lead Developer
    #428166
    Mathias

    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?)

    #428170
    Mathias

    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

    #428246
    Tom
    Lead Developer
    Lead Developer

    Are you using <p1>? WordPress strips invalid HTML, which that would fall under.

    #428257
    Mathias

    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!

    #428268
    Tom
    Lead Developer
    Lead Developer

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

    #428282
    Mathias

    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?

    #428292
    Tom
    Lead Developer
    Lead Developer

    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.

Viewing 15 posts - 1 through 15 (of 21 total)
  • You must be logged in to reply to this topic.