Search code examples
csswordpressstylesheet

Stylesheet path issue


I'm editing an app on my website but the style sheet is located in this path:

home/aib23/public_html/wp-content/themes/striking_r/assets/affiliate_app_css

what would the stylesheet look like for that path? This is what I thought it was:

<link rel="stylesheet" file://home/aib23/public_html/wp-content/themes/striking_r/assets/app_css" />  

but it did not seem to work. Note that this stylesheet is placed within my wordpress theme folder.

Any help would be appreciated! Thanks in advance to those that contribute! :)


Solution

  • This kind of path is local to the client system. So if I visit a page with this link it will look for your CSS file on my computer, at /home/aib23/public_html/wp-content/themes/striking_r/assets/app_css

    Also, you need to use the href attribute in your link element in order for it to work.

    I suggest you use a link relative to your web root - like this:

    <link rel="stylesheet" href="/wp-content/themes/striking_r/assets/affiliate_app_css/myfile.css" />  
    

    Replace myfile.css with the name of your stylesheet.