if you are asking default background image for
add_theme_support( 'custom-background'); then it can be set using 'default-image' => get_template_directory_uri() . '/images/pattern.png',
complete code will look like below.
$args = array(
'default-color' => 'f0f0f0',
'default-repeat' => 'fixed',
'default-image' => get_template_directory_uri() . '/assets/images/pattern.png',
);
add_theme_support( 'custom-background', $args );
Related Posts:
- How to add CSS class to custom logo?
- Editing the custom background CSS
- Add colors to existing color palette without replacing it
- What flex-width/height does?
- add_theme_support(‘my-custom-feature’)
- add_theme_support( ‘custom-header’ ) does not add option menu in dashboard
- “add_theme_support” for custom footer color?
- Show video as part of the post?
- How to add theme support?
- Edit footer via customizer
- Theme Development: Starter Content after hook
- Can I add multiple arrays within add_theme_support( ‘colors’ )?
- How to use add_theme_support(‘html5’)?
- Theme support title tag – how to replace the default WP separator (with a filter)?
- WordPress HTML5 Gallery Support – Convert HTML4 -> HTML5
- add_theme_support( ‘admin-bar’ ) causes fatal error
- What is difference between add_theme_support and Theme Customization API?
- Replaceing _custom_background_cb
- Theme’s featured image option is not showing up
- Making update notification functionality for my themes
- Best practice for including plugins as part of a theme?
- How to set the default value of a option in a theme?
- How to develop a multilingual theme?
- Add meta-information to theme itself
- Theme elements not translating
- why does twenty eleven theme mix up the css measurement units?
- Is using eval() ok in this scenario
- Should I update my _s theme?
- Display site admin profile fields in header.php
- WordPress Genesis Child Theme Filter divs
- Displaying part of every child page?
- How do I obtain the post content via a custom meta box inside the editor?
- Displaying Remote Data inside of Theme admin
- how to change a theme slug
- Weekly background code not working
- I want to get the home root path
- How to add code in the content area in a WordPress theme?
- Can I show all the template files that are being used on my site?
- Unable to pass variable on theme cusomizer add_settings()
- get_theme_mod returning no output
- Can I have a widget and sidebars in custom theme?
- Select full Image Size on widget “Genesis – Featured Posts”
- Where to find the code that redirects requests on the static page URL to the home page
- How to change database values on theme update
- after renaming my wp-content folder, how do I upgrade my wordpress version?
- Issue on Adding A Class to Bootstrap Navbar Walker Dropdown
- Efficiency of wp_options vs a new table
- Edit value of the_content() before showing
- is_home and is_frontpage always true
- How to correctly enqueue the parent and child theme stylesheets in the creation of a child theme? [duplicate]
- header_image not returning header image url
- Taxonomy-$taxonomy-$term not working
- WordPress linking
- CSS class on last post in loop ( custom query )
- how to make wordpress change the title and keep page name?
- searchform.php doesn’t work properly
- What are the allowable Tags values in a theme file header?
- Place title (in correct place) above image with opaque background [closed]
- my single.php is mixup on some post for no reason
- How do I implement jPanelMenu?
- When trying to set title, not sure how to edit it for different pages
- Post thumbnails Retrieve Url
- Stylesheet is not loading on firefox and IE!
- static front page ONLY for certain themes?
- How to add cropped custom header image?
- How to custom category template based on category?
- add_action for admin_init hook with a parameter
- custom post type query causing errors
- Category-specific loop not working
- Is it possible for the enqueue styles function to mess up my CSS?
- how can i remove js file from my footer in wordpress
- WordPress Admin bar missing from custom theme
- How to dynamically set a background image with the customizer without putting the css as an inline-style
- Alter shop page lay-out in OceanWP theme
- SIte logo is not displaying
- wordpress custom category post shortcode
- the_content() is getting null in Preview Debug
- Different WP Rest API custom endpoints across different themes
- How to set different localization file for different users?
- How to add an import widgets functionality to wordpress themes without a plugin
- how to add jquery to wordpress
- Change site title color on individual pages
- How to add custom nav_menu_css_class to certain menu only?
- Need help with adding custom menu content
- child comments not displaying as nested
- Simple loop with shortcode rendering problem
- Theme automatically inserting “more” tag on every post
- How get the 10 most viewed pages (not post)
- WordPress widgets manager option for emulating theme layout
- Conditional tags issue for multiple is_page() conditions in sidebar.php
- have_posts() return false on single post
- Im using a right approach to use this class inside WordPress theme?
- Bestway to write php functions
- Is using display: none the proper way to hide elements in a theme?
- How to change order of elements using a child theme
- Correct way to make a custom block theme responsive
- Add wrapper for a specific sub-menu
- Not Able to Access Terms Under Custom Taxonomy Archive
- Custom add to cart does not work well only on the first time
- Trying to create a cutom query with pagination and page 2 breaking. Any help?