[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
    Posts
  • #989366
    Jason

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

    #989532
    David
    Staff
    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.

    #991137
    Jason

    Thanks,
    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?

    #991396
    David
    Staff
    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:

    https://generatepress.com/fastest-wordpress-theme/

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

    #993380
    Jason

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

    #993579
    David
    Staff
    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.