'; } if ( count( $post_count ) ) { echo '
'; echo '
'; foreach ( $query_posts as $post ) { $categories = get_the_terms( $post->ID, 'product_categories' ); setup_postdata($post); $title = get_the_title( $post->ID ); $link = get_the_permalink( $post->ID ); $shed_add_to_home = get_field('shed_add_to_home', $post->ID); //$excerpt = get_the_excerpt( $post->ID ); if ( $excerpt ) { $excerpt = str_replace( '[...]', '', $excerpt ); } else { $excerpt = get_the_content(); $excerpt = preg_replace('/(<)([img])(\w+)([^>]*>)/', '', $excerpt); $excerpt = apply_filters('the_content', $excerpt); $excerpt = str_replace(']]>', ']]>', $excerpt); } /* $excerpt = wp_trim_words( $excerpt, 20, '' ); $excerpt = str_replace( '. Read More...', '.', $excerpt ); $excerpt = str_replace( 'Read More...', '...', $excerpt ); */ $thumbnail = ''; if ( has_post_thumbnail( $post->ID ) ) { $thumbnail = get_the_post_thumbnail( $post->ID, 'img-products-section' ); } else { $thumbnail = 'Placeholder'; } ?>
'; } if ( count( $post_count ) ) { echo '
'; echo '
'; foreach ( $query_posts as $post ) { $categories = get_the_terms( $post->ID, 'product_categories' ); setup_postdata($post); $title = get_the_title( $post->ID ); $link = get_the_permalink( $post->ID ); $shed_add_to_home = get_field('shed_add_to_home', $post->ID); //$excerpt = get_the_excerpt( $post->ID ); if ( $excerpt ) { $excerpt = str_replace( '[...]', '', $excerpt ); } else { $excerpt = get_the_content(); $excerpt = preg_replace('/(<)([img])(\w+)([^>]*>)/', '', $excerpt); $excerpt = apply_filters('the_content', $excerpt); $excerpt = str_replace(']]>', ']]>', $excerpt); } /* $excerpt = wp_trim_words( $excerpt, 20, '' ); $excerpt = str_replace( '. Read More...', '.', $excerpt ); $excerpt = str_replace( 'Read More...', '...', $excerpt ); */ $thumbnail = ''; if ( has_post_thumbnail( $post->ID ) ) { $thumbnail = get_the_post_thumbnail( $post->ID, 'img-products-section' ); } else { $thumbnail = 'Placeholder'; } ?>
'; } if ( count( $post_count ) ) { echo '
'; echo '
'; foreach ( $query_posts as $post ) { $categories = get_the_terms( $post->ID, 'product_categories' ); setup_postdata($post); $title = get_the_title( $post->ID ); $link = get_the_permalink( $post->ID ); $shed_add_to_home = get_field('shed_add_to_home', $post->ID); //$excerpt = get_the_excerpt( $post->ID ); if ( $excerpt ) { $excerpt = str_replace( '[...]', '', $excerpt ); } else { $excerpt = get_the_content(); $excerpt = preg_replace('/(<)([img])(\w+)([^>]*>)/', '', $excerpt); $excerpt = apply_filters('the_content', $excerpt); $excerpt = str_replace(']]>', ']]>', $excerpt); } /* $excerpt = wp_trim_words( $excerpt, 20, '' ); $excerpt = str_replace( '. Read More...', '.', $excerpt ); $excerpt = str_replace( 'Read More...', '...', $excerpt ); */ $thumbnail = ''; if ( has_post_thumbnail( $post->ID ) ) { $thumbnail = get_the_post_thumbnail( $post->ID, 'img-products-section' ); } else { $thumbnail = 'Placeholder'; } ?>
'; } if ( count( $post_count ) ) { echo '
'; echo '
'; foreach ( $query_posts as $post ) { $categories = get_the_terms( $post->ID, 'product_categories' ); setup_postdata($post); $title = get_the_title( $post->ID ); $link = get_the_permalink( $post->ID ); $shed_add_to_home = get_field('shed_add_to_home', $post->ID); //$excerpt = get_the_excerpt( $post->ID ); if ( $excerpt ) { $excerpt = str_replace( '[...]', '', $excerpt ); } else { $excerpt = get_the_content(); $excerpt = preg_replace('/(<)([img])(\w+)([^>]*>)/', '', $excerpt); $excerpt = apply_filters('the_content', $excerpt); $excerpt = str_replace(']]>', ']]>', $excerpt); } /* $excerpt = wp_trim_words( $excerpt, 20, '' ); $excerpt = str_replace( '. Read More...', '.', $excerpt ); $excerpt = str_replace( 'Read More...', '...', $excerpt ); */ $thumbnail = ''; if ( has_post_thumbnail( $post->ID ) ) { $thumbnail = get_the_post_thumbnail( $post->ID, 'img-products-section' ); } else { $thumbnail = 'Placeholder'; } ?>
'; } if ( count( $post_count ) ) { echo '
'; echo '
'; foreach ( $query_posts as $post ) { $categories = get_the_terms( $post->ID, 'product_categories' ); setup_postdata($post); $title = get_the_title( $post->ID ); $link = get_the_permalink( $post->ID ); $shed_add_to_home = get_field('shed_add_to_home', $post->ID); //$excerpt = get_the_excerpt( $post->ID ); if ( $excerpt ) { $excerpt = str_replace( '[...]', '', $excerpt ); } else { $excerpt = get_the_content(); $excerpt = preg_replace('/(<)([img])(\w+)([^>]*>)/', '', $excerpt); $excerpt = apply_filters('the_content', $excerpt); $excerpt = str_replace(']]>', ']]>', $excerpt); } /* $excerpt = wp_trim_words( $excerpt, 20, '' ); $excerpt = str_replace( '. Read More...', '.', $excerpt ); $excerpt = str_replace( 'Read More...', '...', $excerpt ); */ $thumbnail = ''; if ( has_post_thumbnail( $post->ID ) ) { $thumbnail = get_the_post_thumbnail( $post->ID, 'img-products-section' ); } else { $thumbnail = 'Placeholder'; } ?>