Question about “wp-content/themes/layerswp/assets/css/custom.css”?

Asked on February 19, 2016 in Customization.

So far I’ve been using the customize CSS feature, but I have a lot of classes that use background images with relative URLs. The problem with this is that, while in the Home page everything works fine, if for example I go to www.mysite.com/page/subpage, all relative URLs are broken, as they are calculated based on the current page, while in a CSS file they’re calculated from the CSS file path.

That led me to discover this line in my page source:

<link rel=’stylesheetid=’layers-custom-styles-csshref='<MYWEBSITE>/wp-content/themes/layerswp/assets/css/custom.css?ver=4.4.2′ type=’text/cssmedia=’all‘ />

While there’s no way to edit it from Layers Dashboard, I could edit with WPide plugin, but I wonder if this file would be overwritten when updating LayersWP. Also, I’m curious about what this comment in the file means:

“File exists purely to hook into wp_add_inline_styles();”

I hope someone can clear my doubts. I’d like to use custom.css file instead of customize CSS textbox. The best would be that this “customize CSS” textbox actually edits “custom.css” instead of adding the content as inline style in the html.

On the other hand, it would also be great having support for less CSS.

luismorcillo Power User
Reply
  • Possible Answers to Your Question:

  • 1 Answer(s)
    Answered on March 7, 2016.

    Hi there,
    You either need to use absolute URLs (recommended) or create a child theme with its own style.css. Do not use the custom.css in Layers – I am not even sure why it exists.

    The Vlone Outfit carries a strong message behind it. It refers to “You live alone, you die alone”. It reflects your lifestyle. The way to express your feelings, thoughts, and ideas in terms of dressing. https://vloneoutfit.com/

    on January 25, 2022.
    Reply