如何用滑块替换二十七个Wordpress标题?

时间:2017-04-29 14:48:11

标签: javascript php css wordpress

我希望我的标题替换为使用Master Slider小部件制作的滑块。我希望滑块是全尺寸的,就像现在的标题图像一样。

这是标题代码:

<?php
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js no-svg">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">

<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyseventeen' ); ?></a>

<header id="masthead" class="site-header" role="banner">
    <?php get_template_part( 'template-parts/header/header', 'image' ); ?>

    <?php if ( has_nav_menu( 'top' ) ) : ?>
        <div class="navigation-top">
            <div class="wrap">
                <?php get_template_part( 'template-parts/navigation/navigation', 'top' ); ?>
            </div><!-- .wrap -->
        </div><!-- .navigation-top -->
    <?php endif; ?>

</header><!-- #masthead -->

<?php
// If a regular post or page, and not the front page, show the featured image.
if ( has_post_thumbnail() && ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) ) :
    echo '<div class="single-featured-image-header">';
    the_post_thumbnail( 'twentyseventeen-featured-image' );
    echo '</div><!-- .single-featured-image-header -->';
endif;
?>

<div class="site-content-contain">
    <div id="content" class="site-content">

我的滑块的短代码是: [masterslider id =&#34; 1&#34;]

PHP函数: <?php masterslider(1); ?>

如何插入此图像滑块以仅替换首页上的标题图像而不影响页面的其余部分?

感谢。

0 个答案:

没有答案