【发布时间】:2013-07-27 14:14:23
【问题描述】:
我正在开发一个 wordpress 主题。为了向我的主题添加自定义背景选项,我在 functions.php 中添加了代码
add_theme_support( 'custom-background' );
这里我没有为背景的默认设置添加任何功能。我的 header.php 也是这样的
<?php wp_head(); ?>
</head>
<body <?php body_class(''); ?>>
按照 wordpress 文档的建议 (Watch here in the wordpress codex)。
完成这些步骤后,从 wordpress Dashboard -> Appearance -> Backgorund 设置它只适用于颜色而不适用于图像。然后我检查了 google chrome 并在 body 标签的 css 属性中发现了这个
background-image: url('[site_url]/wp-content/uploads/2013/07/Tulips.jpg')
所以我了解到图片网址有问题。
有人可以帮忙吗?请。
【问题讨论】:
标签: wordpress wordpress-theming