add theme support - Custom Background not Appearing

I have a very simple theme to which I need to add custom-background support.When I go into appearance -> customize, I

I have a very simple theme to which I need to add custom-background support.

When I go into appearance -> customize, I am able to select a background image.

However, the background of the site never actually changes, and I can see that the output html contains

<body class="home blog logged-in admin-bar no-customize-support custom-background">

But there are no <style> tags to be seen.

Does anyone have any suggestions as to what may be going wrong?

header.php

<html>
<head>
    <title>Tutorial theme</title>
    <link href=".3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet">
</head>
<body <?php body_class(''); ?>>
    <div id="wrapper">
        <div id="header">
        <h1>HEADER</h1>
    </div>

functions.php

<?php
    $defaults = array(
        'default-image' => '',
        'default-preset' => 'default',
        'default-position-x' => 'left',
        'default-position-y' => 'top',
        'default-size' => 'auto',
        'default-repeat' => 'repeat',
        'default-attachment' => 'scroll',
        'default-color' => '',
        'wp-head-callback' => '_custom_background_cb',
        'admin-head-callback' => '',
        'admin-preview-callback' => '',
    );
    add_theme_support('custom-background', $defaults );
?>

I also tried simply adding add_theme_support('custom-background'); but no luck.

I am using version 4.7.5

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742317929a4421209.html

相关推荐

  • add theme support - Custom Background not Appearing

    I have a very simple theme to which I need to add custom-background support.When I go into appearance -> customize, I

    11小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信