diff --git a/wp-content/plugins/cac-featured-content/cac-featured-content.php b/wp-content/plugins/cac-featured-content/cac-featured-content.php index 84c6160da4..6541bbf95f 100644 --- a/wp-content/plugins/cac-featured-content/cac-featured-content.php +++ b/wp-content/plugins/cac-featured-content/cac-featured-content.php @@ -834,12 +834,14 @@ public function renderType_POST() { ******Switch Context****** **************************/ switch_to_blog($blog_id); - query_posts('p='.$post->ID); + + $the_posts = new WP_Query( array( 'p' => $post->ID, 'posts_per_page' => 1 ) ); + //Set the loop for this one post - while(have_posts()) : the_post(); + if ( $the_posts->have_posts() ) { while( $the_posts->have_posts() ) : $the_posts->the_post(); // Ok, we're just going to go in search of an image in the post_content - $post_with_one_image = $this->getPostContentImage($post->post_content); + $post_with_one_image = $this->getPostContentImage(get_the_content()); $output = preg_match_all('//i', $post_with_one_image, $matches); $first_img = isset( $matches[1][0] ) ? $this->get_fully_qualified_image_path($matches[1][0]) : ''; @@ -859,18 +861,18 @@ public function renderType_POST() { -

post_title ?>

+

-

cacfc->cropHTML($post_excerpt, $this->crop_config)); ?>

+

cacfc->cropHTML(get_the_excerpt(), $this->crop_config)); ?>

'.$this->read_more_text.''; ?>