轮翻文件路径:

/ripro/parts/home-mode/slider.php

直接复制文档里面的代码替换slider里面的代码

<?php

$mode_slider = _cao('mode_slider');

$args = array(
    'cat'       => $mode_slider['category'],
    'ignore_sticky_posts' => true,
    'post_status'         => 'publish',
    'posts_per_page'      => $mode_slider['count'],
    'offset'              => $mode_slider['offset'],
    'orderby'              => $mode_slider['orderby'],
);


$data = new WP_Query($args);

if ($mode_slider['is_styles_rand']) {
    $mode_slider_style = mt_rand(0,1);
}else{
    $mode_slider_style = $mode_slider['styles'];
}
ob_start(); ?>

<?php if ($mode_slider_style == '1') : ?>
<div class="section banner-17codesign">
    <div class="container">
        <div class="module slider big owl nav-white<?php echo esc_attr( $mode_slider['autoplay'] ? ' autoplay' : '' ); ?>">
        <?php if ($mode_slider['diy_slider']) : ?>
            <?php foreach ($mode_slider['diy_data'] as $key => $item) {
              echo '<article class="post lazyload visible" data-bg="'.esc_url( $item['_img'] ).'">';
                echo '<a'.( $item['_blank'] ? ' target="_blank"' : '' ).' class="u-permalink" href="'.esc_url(%20$item['_href']%20).'"></a>';
              echo '</article>';
          } ?>
        <?php else : ?>
          <?php while ( $data->have_posts() ) : $data->the_post();
            $bg_image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'full' ); 
            $bg_image_src = ($bg_image) ? $bg_image[0] : _the_theme_thumb_full();
            ?>
            <article <?php post_class( 'post lazyload visible' ); ?> data-bg="<?php echo esc_url( $bg_image_src ); ?>">
              <div class="entry-wrapper">
                <?php cao_entry_header( array( 'tag' => 'h2', 'link' => false, 'white' => true, 'category' => true,'author'=>true ) ); ?>
                <?php if ( $_get_excerpt = _get_excerpt(120) ) : ?>
                  <div class="entry-excerpt u-text-format">
                    <?php echo $_get_excerpt; ?>
                  </div>
                <?php endif; ?>
                <?php get_template_part( 'parts/entry-footer' ); ?>
              </div>
              <a<?php echo _target_blank();?> class="u-permalink" href="<?php%20echo%20esc_url(%20get_permalink()%20);%20?>"></a>
            </article>
          <?php endwhile; ?>
        <?php endif; ?>
        </div>
    </div>
</div>
<?php else : ?>
<div class="section bgcolor-fff pt-0">
    <div class="module slider center owl<?php echo esc_attr( $mode_slider['autoplay'] ? ' autoplay' : '' ); ?>">

      <?php if ($mode_slider['diy_slider']) : ?>
        <?php foreach ($mode_slider['diy_data'] as $key => $item) {
            echo '<article class="post lazyload visible" data-bg="'.esc_url( $item['_img'] ).'">';
              echo '<a'.( $item['_blank'] ? ' target="_blank"' : '' ).' class="u-permalink" href="'.esc_url(%20$item['_href']%20).'"></a>';
            echo '</article>';
        } ?>
      <?php else : ?>
        <?php while ( $data->have_posts() ) : $data->the_post();
          $bg_image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'full' ); 
          $bg_image_src = ($bg_image) ? $bg_image[0] : _the_theme_thumb_full();
          ?>
          <article <?php post_class( 'post lazyload visible' ); ?> data-bg="<?php echo esc_url( $bg_image_src ); ?>">
            <div class="entry-wrapper">
              <?php cao_entry_header( array( 'tag' => 'h2', 'link' => false, 'white' => true, 'category' => true ,'author'=>true) ); ?>
              <?php if ( $_get_excerpt = _get_excerpt(120) ) : ?>
                <div class="entry-excerpt u-text-format">
                  <?php echo $_get_excerpt; ?>
                </div>
              <?php endif; ?>
              <?php get_template_part( 'parts/entry-footer' ); ?>
            </div>
            <a<?php echo _target_blank();?> class="u-permalink" href="<?php%20echo%20esc_url(%20get_permalink()%20);%20?>"></a>
          </article>
        <?php endwhile; ?>
      <?php endif; ?>
      
    </div>
</div>
<?php endif; 
$site_notify_text = _cao('site_notify_text','');
if ($site_notify_text) : ?>

<?php endif; ?>
<?php
wp_reset_postdata();
echo ob_get_clean();

 

1、本站名称:枫子博客
2、博主邮箱:fz@itfz.com 博主:枫子
3、本站永久网址:https://www.itfz.com
4、枫子博客资源来源于网络,如有侵权,请联系站长进行删除处理。
枫子博客 » ripro主题全屏轮翻大小修改

枫子博客提供优质的网络资源集合