Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress 使用ACF的不同全屏背景_Wordpress_Background_Fullscreen_Advanced Custom Fields - Fatal编程技术网

Wordpress 使用ACF的不同全屏背景

Wordpress 使用ACF的不同全屏背景,wordpress,background,fullscreen,advanced-custom-fields,Wordpress,Background,Fullscreen,Advanced Custom Fields,在cusotm post类型中,我有5个不同的图像,可以由高级自定义字段定义。使用以下代码,我将#内部标题的背景定义为第一个图像: <?php $background = wp_get_attachment_image_src( get_post_thumbnail_id( $page->ID ), 'full' ); ?> <style> #inner-header { background-image: url('<?ph

在cusotm post类型中,我有5个不同的图像,可以由高级自定义字段定义。使用以下代码,我将#内部标题的背景定义为第一个图像:

<?php $background = wp_get_attachment_image_src( get_post_thumbnail_id( $page->ID ), 'full' ); ?>

    <style>
    #inner-header {
        background-image: url('<?php echo $background[0]; ?>');
    }
    </style>

#内割台{
背景图像:url(“”);
}

现在,我想在我的页面中使用箭头切换我定义的不同图像的背景。

请显示迄今为止执行此操作的代码。或者使用我在上面使用过的代码,因为之前我只打算使用单个背景图像。我没有比这更多的了。