External link in slider

hi,

first of all, thanks for the amazing theme.

I need to duplicate the slider image, so I can have two images linking to the same page, and I found the child theme with this code below:

<?php

// Queue parent style followed by child/customized style
add_action( ‘wp_enqueue_scripts’, ‘func_enqueue_child_styles’, 99);

function func_enqueue_child_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
wp_dequeue_style(‘activello-style’);
wp_enqueue_style( ‘activello-style’,
get_stylesheet_directory_uri() . ‘/style.css’,
array(‘parent-style’)
);
}

/**

  • Featured image slider, displayed on front page for static page and blog
    */
    function activello_featured_slider() {
    if ( is_front_page() && of_get_option( ‘activello_slider_checkbox’ ) == 1 ) {
    echo ‘<div class=“flexslider”>’;
    echo ‘<ul class=“slides”>’;

     $count = of_get_option( 'activello_slide_number' );
     // $slidecat =of_get_option( 'activello_slide_categories' );
    
     $query = new WP_Query( array( 'posts_per_page' =&gt;$count, 'post_type' =&gt; 'page', 'meta_key' =&gt; 'slider_page' ) );
     if ($query-&gt;have_posts()) :
       while ($query-&gt;have_posts()) : $query-&gt;the_post();
    
       echo '<li><a href="'. get_permalink() .'">';
         if ( (function_exists( 'has_post_thumbnail' )) &amp;&amp; ( has_post_thumbnail() ) ) :
           echo get_the_post_thumbnail();
         endif;
    
           echo '&lt;div class="flex-caption"&gt;';
               if ( get_the_title() != '' ) echo '&lt;h2 class="entry-title"&gt;'. get_the_title().'&lt;/h2&gt;';
               if ( get_the_excerpt() != '' ) echo '&lt;div class="excerpt"&gt;' . get_the_excerpt() .'&lt;/div&gt;';
           echo '&lt;/div&gt;';
           echo '</a></li>';
           endwhile;
         endif;
    

    echo ‘

’;
echo ’ </div>’;
}
}


Is there a way that I can do this?

Thanks,

Hi @gabeland,

I hope you are well today and thank you for your question.

To duplicate the slider image,just change the following line of code in the above shared code.

Before Editing :


echo get_the_post_thumbnail();

After Editing :

echo get_the_post_thumbnail();
echo get_the_post_thumbnail();

Best Regards,
Movin