'; } } endif; // end if meridian_one_pingback_header exists add_action( 'wp_head', 'meridian_one_pingback_header' ); if ( ! function_exists( 'meridian_one_excerpt_more' ) ) : /** * Continue reading for excerpt * * @since 1.0 */ function meridian_one_excerpt_more( $more ) { global $post; return '
'; } add_filter('excerpt_more', 'meridian_one_excerpt_more'); endif; // end if meridian_one_excerpt_more exists if ( ! function_exists( 'meridian_one_post_content_first_url' ) ) : /** * Get the first URL in the post content * * @since 1.0 */ function meridian_one_post_content_first_url() { // get post contet $post_content = get_the_content(); // check for URL $the_url = get_url_in_content( $post_content ); // pass it back return ( $the_url ) ? $the_url : apply_filters( 'the_permalink', get_permalink() ); } endif; // end if meridian_one_post_content_first_url exists if ( ! function_exists( 'meridian_one_home_section_blog_display_posts' ) ) : /** * Outputs blog posts listing on homepage * * @since 1.0 */ function meridian_one_home_section_blog_display_posts( $category = false ) { // query args $args = array( 'posts_per_page' => 3, 'ignore_sticky_posts' => true, 'no_found_rows' => true, ); if ( is_numeric( $category ) ) { $category = intval( $category ); $args['tax_query'] = array( array( 'taxonomy' => 'category', 'terms' => array( $category ), 'field' => 'term_id' ), ); } // query posts $meridian_one_query = new WP_Query( $args ); // if there are posts if ( $meridian_one_query->have_posts() ) : // count $count = 0; ?>