Just add a STYLE tag in 'wp_head'
.
// Anonymous function, PHP 5.3+, extract function for 5.2
add_action('wp_head', function(){
echo '<style type="text/css">';
// Add background style here
echo '</style>';
});
Add this in your functions.php
. Don’t stuff too much CSS in it, just the dynamic bg image you need.
It’s not the easiest thing to create a dynamic CSS file so, just for a bg image, use this method.
Related Posts:
- How do I add CSS options to my plugin without using inline styles?
- Is it ever okay to include inline CSS in plugins?
- How to add sub-menu to a menu generated by wp_nav_menu by using plugin
- How to prevent loading of all plugin’s resources?
- What is the best way to provide plugin users with a way to customized the styles
- What is better way to use Bootstrap inside admin panel?
- wp_enqueue_style built in styles
- Backslashes being stripped from CSS
- Dequeue theme stylesheets but keep widget styling on custom page template
- How to check if a stylesheet is already loaded?
- how to include javascript file and css file in wordpress
- How can I add a CSS rule to edit.php?
- Remove Internal Style Sheet if no Value Provided?
- What parameter should I pass to wp_enqueue_style to depend on the themes stylesheet?
- Is there no admin ui guide for 4.x?
- Correct check for any admin page with editor
- How to remove default style of header in wordpress metabox
- CSS not affecting widget output
- How can I avoid conflicts between plugin and theme?
- Plugin Development/ Stop CSS clashes.
- Can’t change the style of a submit input type? [closed]
- Make a plugin page out of influence of the theme’s style
- Distributing Frontend Assets with Plugins
- My stylesheets are not enqueuing
- Custom Plugin – CSS works, JS doesn’t
- Are there any official or unofficial guidelines for the styling of a widget?
- Proper way to include stylesheet for panels
- Apply styles to blockquote element with the WYSIWYG editor
- Styles don’t load correctly. Insecure content
- Completely isolate a plugin view so it doesn’t load the theme
- Does WordPress default CSS have Grids?
- How to insert HTML/CSS/JS into my iframe plugin?
- How To Protect Plugin Display From Being Affected By Theme’s CSS
- Load stylesheet in edit category page?
- CSS not being applied using wp_enqueue_style
- WordPress Plugin Authoring question about jquery and css
- How to add some basic inline CSS using existing plugin or theme?
- Why my theme’s css not working on another site
- WordPress plugin development theme issue
- Why does theme’s reset CSS have higher precedence of plugin’s CSS?
- Twenty-seventy theme remove additional CSS from head
- How to customize the size of Featured Images or Post Thumbnails in WordPress?
- Publish, Save Draft and Preview buttons do not work after being moved with jQuery
- Unable to link CSS file
- How can I add the Post ID to Class Name in Jquery?
- Let user override plugin CSS
- Best practice to include custom user styles in widgets
- How to create A – Z List with pictures?
- how to add contact form 7 shortcode in javascript variable
- What process do you use for WordPress development? [closed]
- Where to put third party PHP library?
- Add a new tab to WordPress Plugin install Listing
- Export data as CSV in back end with proper HTTP headers
- Scheduled events disappear from events queue
- How to integrate a PHP webmail script into the backend of WordPress?
- Custom Post Type Link from Plugin
- How to Get a List of Sub Blogs without Using get_blog_list()?
- Conditional check to see if a bootstrap.css is included in a theme
- Using ob_start() in plugin
- Create Element From Dynamic HTML String [closed]
- what is the best practice for including ‘wp-includes’ classes
- Custom Plugin Database relations
- Save user-specific options in WordPress admin
- Why is print_r returning $classObj->userObj in several places on site
- How can i get the title i specified in add_options_page for my header
- use __($str) to translate strings (symfony/twig)
- Is there a way to list tags order by post_meta field
- Best plugin for most viewed post [closed]
- What could cause my plugin’s options/settings page not to load?
- Plugin Upgrade Strategy
- Which are the hooks run before/after when a category’s deletion?
- Disable The Events Calendar plugin from loading its scripts
- get_the_excerpt() not working in plugin loop
- Plugin with action ‘save_post’ needs to press publish twice on order to publish
- How to analyze wordpress plugin performance
- Wrap text around shortcode
- Checked() function on a multidimensional array
- Plugin does not add action
- Jquery was not found on this server
- How to create a digital product download link that can’t be used twice?
- How to create ShortCode
- shortcode tags not working in do_shortcode
- Why is the form not updating when I select a new sector from the list?
- How to change a field in database through a submit button or Checkbox? [closed]
- Grandchildtheme (plugin) add header.php (not exist in child theme)
- $wpdb->update Issue
- Import images remotly run through timeout error
- How to make every image title equal to alt text(wordpress/woocommerce)?
- Load specific page when a custom URL is hit
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- HTMLCollection not counting right in editor? / for loop not working on elements in DOM
- Trying to rename a file upload as the hash of file content on wordpress
- Getting products information, in woocommerce based on products ID
- How can I measure CPU and RAM used by my theme or plugin
- want to confirm popup with “Yes” and “No” button when user click on add to cart
- Modify search form with plugin
- How to display properly exception or echo string after posting in plugin?
- When using an options array the Settings API isn’t creating the database record
- On one of my sites a file is shown as 404 but the file IS there
- Extend WP_List_Table class – Edit wp_usermeta – WPPB.me Boilerplate – Action error