dimanche 24 février 2019

PHP slideshow PREV and NEXT buttons not working

array( 'image' => $image1, 'title' => $image1_title, 'description' => $image1_desc, 'link' => $image1_link ), 'slide2' => array( 'image' => $image2, 'title' => $image2_title, 'description' => $image2_desc, 'link' => $image2_link ), 'slide3' => array( 'image' => $image3, 'title' => $image3_title, 'description' => $image3_desc, 'link' => $image3_link ), 'slide4' => array( 'image' => $image4, 'title' => $image4_title, 'description' => $image4_desc, 'link' => $image4_link ), 'slide5' => array( 'image' => $image5, 'title' => $image5_title, 'description' => $image5_desc, 'link' => $image5_link ) ); /*check if exist slide*/ $check_exist_slide = 0; foreach($kitter_slider as $slide => $value) { if (!empty ($value['image'])){ $check_exist_slide = 1; } } ?>
<!--slider-->
<section id="slider-bg-wrapper" class="full-width-wrapper">

    <?php if($data['md_enable_slider_background']){?>
    <div id="slider-bg-overlay">
        <div id="slider-bg-overlay1"></div>
        <div id="slider-bg-overlay2"></div>
    </div>
    <?php }?>

    <div id="slider-shadow">
        <div class="fixed-width-wrapper">
            <div class="box_skitter box_skitter_home maxx-theme" id="slider-wrapper">
            <?php if($check_exist_slide == 1) {// check if any slide image added in theme option, return custom slide?>
                <ul>
                    <?php foreach($kitter_slider as $slide => $value) {
                        if (!empty ($value['image'])) {?>

                        <li>
                            <?php if (!empty ($value['link'])) { ?>
                            <a href="<?php echo $value['link']; ?>" title="<?php echo $value['title']; ?>">
                                <img src="<?php echo $value['image'];?>" width="940" height="370" alt="<?php echo $value['title']; ?>"/>
                            </a>
                            <?php } else { ?>
                                <img src="<?php echo $value['image'];?>" width="940" height="370" alt="<?php echo $value['title']; ?>"/>                        
                            <?php } ?>

                            <?php if (!empty ($value['title'])) { ?>
                            <div class="label_text">
                                <h1><?php echo $value['title'];?></h1>
                                <p><?php echo stripslashes($value['description']) ?></p>
                            </div>
                            <?php }?>
                            </li>
                        </li>
                    <?php }?>
                    <?php }?>

                </ul>

            <?php }?>
            </div>

        </div>
    </div>

    </script>


</section>
<!--/slider-->    

<!--main content-->
<div id="main-content-wrapper" class="fixed-width-wrapper home-page" >

    <!--Content-->
    <div class="entry-content" >
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <!--post entry-->
        <article class="post-entry" id="post-<?php the_ID(); ?>">
            <?php the_content();?>
            <?php wp_link_pages(
                array(
                    'before' => '<div class="link-pages"><strong>'.__('Pages:', 'framework').'</strong> ', 
                    'after' => '</div>', 
                    'next_or_number' => 'number',
                    'nextpagelink'     => __('Next &rarr;', 'framework'),
                    'previouspagelink'     => __('&larr; Prev', 'framework')
                )
            );?>
        </article>
        <!--/post entry-->
        <?php endwhile; endif; ?>    
    </div>
    <!--/Content-->


</div>
<!--/main content-->

<div class="clear"></div>




Aucun commentaire:

Enregistrer un commentaire