Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /home/nandedex/www/wp-content/plugins/better-amp/template/views/home/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : /home/nandedex/www/wp-content/plugins/better-amp/template/views/home/featured.php
<?php

$featured_args = array(
	'post_type'           => 'post',
	'posts_per_page'      => 3,
	'ignore_sticky_posts' => TRUE,
	'meta_query'          => array( // only posts with thumbnail
		'key' => '_thumbnail_id'
	)
);

$featured_query = new WP_Query( apply_filters( 'better-amp/home/featured', $featured_args ) );
better_amp_set_query( $featured_query );

// Enqueue AMP carousel script
better_amp_enqueue_script( 'amp-carousel', 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js' );

?>
	<amp-carousel class="amp-slider amp-featured-slider" layout="responsive"
	              type="slides" <?php better_amp_hw_attr( '', 500 ) ?> delay="3500" autoplay>
		<?php

		while( better_amp_have_posts() ) {

			better_amp_the_post();

			$img = better_amp_get_thumbnail( 'better-amp-large' );

			$id = better_amp_element_uni_id();

			better_amp_add_inline_style( '.' . $id . ' .img-holder{background-image:url(' . $img['src'] . ')}' );

			?>
			<div class="<?php echo $id; ?>">
				<div class="img-holder"></div>
				<div class="content-holder">
					<h3><a href="<?php the_permalink() ?>"><?php echo get_the_title(); ?></a></h3>
				</div>
			</div>
			<?php

		}

		?>
	</amp-carousel>
<?php

better_amp_clear_query();

F1le Man4ger