[Resolved] Merge CSS with Swift and Page Header issue

Home Forums Support [Resolved] Merge CSS with Swift and Page Header issue

Home Forums Support Merge CSS with Swift and Page Header issue

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #989366

    I have setup a Page Header section as per your guide which merges with the page. When I try to merge CSS with Swift the background image no longer appears. Other images I use further down the page as background to certain sections also disappears.
    Any ideas of an exclude etc I could use to address this?

    Customer Support

    Hi there,

    this is the workaround provided by swift:

    Exclude Inline Styles – Exclude inline styles from being merged. When you enable the option Merge Styles, CSS files automatically applies also to inline CSS and 3rd party scripts. If this behavior is creating any issue on your website, you can exclude inline Styless from merging. Find a unique string in the inline Style you wish to exclude and place that in the Exclude Styles field. Swift will search for this string in the inline Styles to decide if it should be excluded or not.

    You should be able to use page-hero as you exclude string.


    Unfortunately that doesn’t seem to hit it!
    Using merge CSS not only removes the image from the Page Hero as made according to these instrutions https://docs.generatepress.com/article/how-to-create-a-page-hero/ and merged with the header, it is also removing images I use for sections within the content of the page.
    Images that are called as part of a plugin shortcode do display, it is only those that are selected at the GP level.
    I have been trying all manner of on / off the options including turning off minify CSS (Minify HTML causes all kinds of issues on my site) but don’t seem to be having any luck. Do you ahve any others ideas?

    Customer Support

    Troubleshooting cache issues can be a pain.
    The simplest method is to deactivate all of the cache settings and then activate them one by one to identify which ones are causing the problem.

    Merging CSS is often an issue as the Cache can re-order the CSS.

    All i can suggest is stepping through that process. We personally recommend using Autoptimize for optimizing a site:


    Although this is not 100% infallible we generally see less issues with it.


    Thanks, I have figured it out
    For reference if anyone else lands here
    Exclude – inline styles
    Exclude – /wp-content/themes/generatepress/style.min.css

    Customer Support

    Glad you found the solution and thank you for sharing

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