• Resolved windofchange87

    (@windofchange87)


    Hello everyone,
    I use the newsmag lite theme, let me know if it was possible to make the banner from fixed to dynamic, taking pictures randomly from the folder.
    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Miha

    (@mplusb)

    Hello @windofchange87,

    Unfortunately, this is not possible at the moment.
    But great suggestion though!

    TGIF,
    Mihaela

    Thread Starter windofchange87

    (@windofchange87)

    Ok, thanks for replying

    Thread Starter windofchange87

    (@windofchange87)

    For now I opted for this solution.

    
    <?php 
    $banner_image = get_template_directory_uri() . '/assets/images/';
    
    $array_image = [
     ["www.otowell.it","otowell.jpg"],
     ["www.terapiaperacufeni.it","terapiaperacufeni.jpg"],
     ["www.sentobene.it","sentobene.jpg"]
    ];
    $shuffle = shuffle($array_image);
    
    foreach ($array_image as list($a, $b)) {
    	$a;
    }
    $join = $banner_image . $b;
    ?>
    	<a href="<?php echo esc_url( $a ) ?>" target="_blank">
    		<img src="<?php echo $join; ?>" />
    	</a>

    What do you think ?
    Although the best thing would be to integrate a carousel

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Banner’ is closed to new replies.