# Css link to local wp-content/themes/

**URL:** <https://community.localwp.com/t/css-link-to-local-wp-content-themes/26843>\
**Category:** WordPress Questions\
**Tags:** css, local-sites-dir\
**Created:** [July 29, 2021, 4:16pm UTC](https://community.localwp.com/t/css-link-to-local-wp-content-themes/26843 "2021-07-29T16:16:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fiefscent](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@fiefscent](https://community.localwp.com/u/fiefscent)\
**Post date:** [July 29, 2021, 4:16pm UTC](https://community.localwp.com/t/css-link-to-local-wp-content-themes/26843/1 "2021-07-29T16:16:28Z")

</div>

### Issue Summary

CSS link to a file in my local /wp-content/themes/ directory doesn’t work, but link to /wp-content/uploads/ does.

#### Troubleshooting Questions

This CSS does NOT show the phone image  
.phone:before { background-image: url(’/wp-content/themes/mytheme/images/icons/phone.svg’);}

But this CSS DOES work.  
.phone:before { background-image: url(’/wp-content/uploads/2021/07/phone.svg’);}

#### System Details

Local version: 6.1.0+5452  
Operating System is macOS Big Sur (11.5)

---

<div class="post-metadata">

**Author:** ![ben.turner](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ben.turner/32/5366_2.png) [@ben.turner](https://community.localwp.com/u/ben.turner)\
**Post date:** [July 29, 2021, 5:09pm UTC](https://community.localwp.com/t/css-link-to-local-wp-content-themes/26843/2 "2021-07-29T17:09:01Z")

</div>

It’s hard to say what the issue is without seeing any errors.

The main things I would recommend exploring:

1. Open the browser console – are there any errors there about the site not able to load that image?

2. Does the image exist in that location?

---

<div class="post-metadata">

**Author:** ![fiefscent](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@fiefscent](https://community.localwp.com/u/fiefscent)\
**Post date:** [July 29, 2021, 5:38pm UTC](https://community.localwp.com/t/css-link-to-local-wp-content-themes/26843/3 "2021-07-29T17:38:33Z")

</div>

Oh my! Very embarrassing. i had a space before the ‘icons’ directory! Thanks for your reply. I will mark this as ‘solved’.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [July 31, 2021, 5:38am UTC](https://community.localwp.com/t/css-link-to-local-wp-content-themes/26843/4 "2021-07-31T05:38:38Z")

</div>

Closed on July 31, 2021, 5:38am UTC

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
