That’s because php code inside a CSS file is not parsed unless you configure your server to. Just use it as a relative path to the image (as per the CSS file).
background: url("images/bg.jpg");
Related Posts:
- Featured images are cropped on index and post page
- how to add version of style.css in wordpress
- How can I version the main CSS file?
- what the best way to include images from the template’s images folder?
- add image size still doesn’t work even after regenerating thumbnails
- How to automatically highlight syntax of code in a post?
- The style.css stylesheet doesn’t contain a valid theme header
- Change Default Image HTML
- Getting rid of unused css directives [closed]
- Change Theme from Plugin based on query_vars
- Alternate header image
- Change logo on each page of University Hub theme [closed]
- How do I copy my Parent Templates to my Child Templates?
- What is the WordPress Pinecone sitting on top of? [closed]
- Theme information in style.css being corrupted
- How to start learning CSS and theme development?
- how to remove padding from left and right side? [closed]
- 404 Error while accessing the font files
- How to load parent theme style.css?
- Child Style.css not overriding parent theme style located in assets/css/main.css
- X-Axis of Site is Messed Up Because it is in Hebrew
- Style the archives/category sidebar widget via theme
- How to find out if page_for_posts is showing (in order to style menu item)
- Custom CSS doesn’t work in edit mode
- Remove transparancy in Sydney theme’s headerimage
- How can I add class to every quote element?
- Twenty fifteen theme – change responsive menu condition
- Port existing Bootstrap site to WordPress?
- How to style the post previews/links without it affecting the main posts?
- What is the meaning of WordPress’s recommended css classes and where are they applied?
- Finding and disabling ‘rogue’ stylesheet from header: Source Sans Pro
- Cannot apply custom css to IE in the theme
- Need to edit themes HTML code
- Plugin and themes are adding the same stylesheets
- Theming global variables – initializing in index.php but using in header.pho
- Understanding the theme details in style.css
- Re-skinning Site
- Getting a ‘slide down’ js panel implemented within WP
- Need a theme that let the posted content stretched maximum width [closed]
- Copying post thumbnail to custom field
- How to upload and style svg logo?
- The requested theme does not exist. Stylesheet is missing – error after changing style.css name to my-styles.css in wp child theme?
- Newbie wordpress question re banner height
- How to trace and resolve a theme problem such as flickering links in WordPress? [closed]
- How to integrate JSS to WordPress
- Why submenu item’s background color is not changing by css?
- Cannot figure out what element header color is in wordpress theme [closed]
- How to access theme fonts using custom CSS style? [closed]
- Using Grunt and keeping theme comments
- Background image appears on localhost site but not online
- header.php-tweak: How to do that getting Meta-Slider into the header-center?
- Display Headings on Index page in different font sizes
- how would I change background color of a theme using a plugin?
- Date based CSS/theme
- Migrating a website using custom image tags to use featured images instead
- how to stop a gallery slideshow
- Is there any way to modify images from a theme using the web interface?
- Whitespace between logo and site title in Twenty Twenty-Two
- CSS appears to not work on any WordPress theme
- Broken theme, stylesheet is missing after uploading the right theme via FTP
- DIVI Theme customizer changes not applied on existing pages and designs are not shown on the front
- How can I modify the CSS only for the search results page of WordPress?
- Remove the breadcrums on a theme W
- Enqueue All Stylesheets Found In a Theme Folder
- WordPress margin issues
- Remove style id inline CSS in WordPress
- Theme CSS missing completely
- WordPress 404 on style.css but not on all pages
- Own Theme custom CSS does not display in editor but works in page
- style.css of my custom theme is not being applied at all
- Custom CSS is overwritten by WordPress?
- WordPress loads old style.css, then loads current one
- How to get dynamic template-function generated CSS into HEAD?
- TwentyFourteen Theme : Changing grid layout
- Using two stylesheets for mobile compatibility
- 1px black line appearing down right side of thumbnails (theme snaps) [closed]
- Phone numbers showing same color as header [closed]
- How to change images size after theme modification?
- Orion theme (from theme forest) [closed]
- Theme files and imagesnot loading on a mobile device
- div having different appearances in different themes
- Customising a theme
- Blog shows up without Theme/CSS styles
- Boldy theme – Regarding the images above the boxes
- Child theme after CSS modification
- How to Hide Blog Post Author?
- I can’t install theme: theme install failed
- How can I either move the nav bar down or create more space for the header? Theme – Ajaira
- theme 2016 – customize css – nothing happens
- Help with responsive theme styling issue
- Theme install failed
- How can i remove footer credit text
- How to make a page extend full screen [closed]
- Help with Divi logo not appearing for 10s
- Custom Theme Additonal CSS “” are transformed to “>” and “<”
- css on body tag in editor
- How can I add a new Styles option in WordPress 2024 theme?
- How do I remove the hamburger menu from the Twenty Twenty Four theme?
- I added a rating system on my blog post but instead of stars it shows boxes
- Apply Style variation to specific pages