How to reference image paths used with rest of theme?
-
How does one use a css background image stored in the theme?
Whenever url() is used, the base path results from the location of the plugin, rather than the location of the theme being used.{ background: url('images/border-img.png') 0 0 repeat-x; }
The result is:
http://www.mysite.com/wp-content/plugins/my-custom-css/images/layout/border-img.png)Would like it to use the images I have stored and use for the rest of the theme at:
http://www.mysite.com/wp-content/themes/my-theme-name/images/border-img.pngAnd if it could correctly manage child themes by finding the base directory using:
<?php echo get_stylesheet_directory_uri() ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to reference image paths used with rest of theme?’ is closed to new replies.