'; $count = 4; $slidecat = get_theme_mod( 'orsay_slider_cat' ); $slidecat = isset($slidecat) ? $slidecat : ''; $active_slide = "active"; $query = new WP_Query( array( 'cat' => $slidecat,'posts_per_page' => $count ) ); if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); echo '
'; if ( (function_exists( 'has_post_thumbnail' )) && ( has_post_thumbnail() ) ) : echo get_the_post_thumbnail( get_the_ID(), 'orsay-slider-thumbnail' ); endif; echo '
'; if ( get_the_title() != '' ) echo '

'. get_the_title().'

' . esc_html__( 'Continue Reading', 'orsay' ) . ''; echo '
'; // .mz-slide-title echo '
'; // .mz-slider-item echo '
'; $active_slide = ""; endwhile; wp_reset_postdata(); endif; echo ''; } } endif; /** * Returns just the URL of an image attachment. * * @param int $image_id The Attachment ID of the desired image. * @param string $size The size of the image to return. * @return bool|string False on failure, image URL on success. */ function orsay_get_image_src( $image_id, $size = 'full' ) { $img_attr = wp_get_attachment_image_src( intval( $image_id ), $size ); if ( ! empty( $img_attr[0] ) ) { return $img_attr[0]; } } /* * Add boostrap classes fot tables */ add_filter( 'the_content', 'orsay_add_custom_table_class' ); function orsay_add_custom_table_class( $content ) { return str_replace( '', '
', $content ); }