Support » Developing with WordPress » shape custom-background with css

  • i want to create a theme has background image that is changeable by admin.for this goal i added that code to my function.php:

    $defaults = array(
        'default-color'          => '',
        'default-image'          => '',
        'default-repeat'         => 'no-repeat',
        'default-position-x'     => 'center',
            'default-position-y'     => 'fixed',
            'default-size'           => 'fixed',
        'default-attachment'     => 'scroll',
        'wp-head-callback'       => '_custom_background_cb',
        'admin-head-callback'    => '',
        'admin-preview-callback' => ''
    );
    add_theme_support( 'custom-background', $defaults );

    but these codes changed my design which created with css.the theme is based on parallax so if css doesnt work, all theme will waste.

    here is the css:

    /* parallax */   #home {
      background: url(<?php get_background_image(); ?>) no-repeat center center fixed; 
      display: table;
      height: 100%;
      position: relative;
      width: 100%;
      -webkit-background-size: cover;
      -moz-background-size: cover;
      -o-background-size: cover;
      background-size: cover;
    }

    so how can shape the function with css? thank you for your helps

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘shape custom-background with css’ is closed to new replies.