HEX
Server: Apache
System: Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User: ws67301310 (67301310)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /homepages/4/d4297730999/htdocs/wordpress/wp-content/kamini-wp copy/bxslider/bxslider.php
<?php

// WP_Query arguments

// WP_Query arguments
$args = array (
	'post_type' => 'page',
	'meta_query'=> array(
        array(
            'key' => 'featured_post',
            'value' => '1',
			'compare' => '=='
        )
    ),
);

// The Query
$query = new WP_Query( $args );


// The Loop
if ( $query->have_posts() ) {
	echo '<div id="bx-container"><ul class="bxslider">';
	while ( $query->have_posts() ) {
		$query->the_post();
		?>
		<li>
			<div class="img_left">
				<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
			</div>
			<div class="content_right">
				<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
				<p>
				<?php
					$content = get_the_content();
					$trimmed_content = wp_trim_words( $content, 20);
					echo $trimmed_content;
				?>
				</p>
				<span class="readmore"><a href="<?php the_permalink(); ?>">Find out more</a></span>
			</div>
		</li>
		<?php
			}
		echo '</ul></div>';
		} else {
			// no posts found
		}
		/* Restore original Post Data */
		wp_reset_postdata();
		?>				

<script>
	jQuery(document).ready(function($){
	  $('.bxslider').bxSlider();
	});
</script>