'enero', 2 => 'febrero', 3 => 'marzo', 4 => 'abril', 5 => 'mayo', 6 => 'junio', 7 => 'julio', 8 => 'agosto', 9 => 'septiembre', 10 => 'octubre', 11 => 'noviembre', 12 => 'diciembre', ); $day = (int) wp_date( 'j', $timestamp ); $month = (int) wp_date( 'n', $timestamp ); $year = wp_date( 'Y', $timestamp ); $label = isset( $months[ $month ] ) ? $months[ $month ] : wp_date( 'F', $timestamp ); return $day . ' ' . $label . ', ' . $year; } function turquesa_blog_byline() { return 'Turquesa Digital'; } function turquesa_blog_category_id() { $term = get_term_by( 'slug', 'blog', 'category' ); return $term ? (int) $term->term_id : 0; } function turquesa_blog_posts_query( $args = array() ) { $defaults = array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 20, 'ignore_sticky_posts' => true, 'no_found_rows' => true, ); if ( empty( $args['cat'] ) && empty( $args['category_name'] ) && turquesa_blog_category_id() ) { $defaults['category_name'] = 'blog'; } return new WP_Query( wp_parse_args( $args, $defaults ) ); } function turquesa_blog_render_recent( $exclude_id = 0, $limit = 5 ) { $query = turquesa_blog_posts_query( array( 'posts_per_page' => $limit, 'post__not_in' => $exclude_id ? array( (int) $exclude_id ) : array(), ) ); if ( ! $query->have_posts() ) { return; } ?>