function prod_relacionados($titulo) { $cates = current_category(); $args = array('cat' => $cates, 'showposts' => 3, 'orderby' => 'date', 'order' => 'DESC'); $ncomentario = get_comments_number(); ?> <div class="conternedor"> <div class="row"> <hr> <div class="contenedor"> <div class="row"> <div class="medium-4 small-4 columns reset"> <div class="etiqueta "> PRODUCTOS </div> </div> </div> <hr> <?php $que_posts = new WP_Query($args); while ($que_posts->have_posts()) { $que_posts->the_post(); ?> <div class="item_content large-4 medium-6 columns"> <div class="items large-12 medium-12 small-12 columns reset"> <div class="fondo_item large-12 medium-12 small-12 columns"> <div class="imagen"> <a href="#" data-reveal-id="myModal1"> <?php if (function_exists('has_post_thumbnail') && has_post_thumbnail()) { echo '<a href="'; the_permalink(); echo '">'; the_post_thumbnail('para_los_post'); echo '</a>'; } else { $postimage = get_post_meta($post->ID, 'post-image', true); if ($postimage) { echo '<img class=imagen src="' . $postimage . '" alt="" />'; } else { $srcc = '<img src="' . IMAGES . '/fondo_item.jpg" alt="" />'; echo $srcc; } } ?> </a> </div> </div> <div class="titulo_item"> <a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'themename'), the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a> </div> <div class="cont_descripcion"> <div class="descripcion"> <?php if (is_archive() || is_search()) { // Only display Excerpts for archives & search ?> <div class="entry-summary"> <?php the_content_limit('40'); /*the_excerpt_rss();*/ ?> </div><!-- .entry-summary --> <?php } else { ?> <div class="entry-content"> <?php the_content_limit('40'); /*the_excerpt_rss();*/ ?> <?php wp_link_pages(array('before' => '<div class="page-link">' . __('Pages:', 'themename'), 'after' => '</div>')); ?> </div><!-- .entry-content --> <?php } ?> </div> </div> </div> </div> <?php } ?> </div> </div> <?php }
function relacionados($titulo) { $cates = current_category(); $args = array('cat' => $cates, 'showposts' => 10, 'orderby' => 'date', 'order' => 'DESC'); $ncomentario = get_comments_number(); echo '<div class="elements_mas_coment">'; echo '<div class="titulo_seccion">'; echo $titulo; echo '</div>'; $que_posts = new WP_Query($args); while ($que_posts->have_posts()) { // $tieneComments = (get_comments_number()>0) ? true : false; // if ($tieneComments){ //if (): // echo"paso"; echo '<div class="contne_mas_coment">'; echo '<div class="cuerp_mas_comet">'; $que_posts->the_post(); echo '<div class="img_pots_mas_coment">'; echo '<a href="'; the_permalink(); echo '">'; the_post_thumbnail('mas_comentados'); echo '</a>'; echo '</div>'; echo '<div class="titulo_post_mas_coment">'; echo '<a href="'; the_permalink(); echo '">'; the_title(); echo '</a>'; /*the_excerpt();*/ echo '</div>'; echo '<div class="foot_comentado">'; echo "<ul>"; echo "<li>"; comments_popup_link(__('<span class="imgc"></span>', 'themename')); echo "</li>"; echo "<li>|</li>"; echo "<li>"; printf(__('<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a>', 'themename'), get_permalink(), get_the_date('c'), get_the_date(), get_author_posts_url(get_the_author_meta('ID')), sprintf(esc_attr__('Ver por %s', 'themename'), get_the_author()), get_the_author()); echo "</li>"; echo "<li>|</li>"; echo "<li>"; the_category(', '); echo "</li>"; echo "</ul>"; echo '</div>'; //.foot_comentado echo '</div>'; //.contne_mas_coment echo '</div>'; //..cuerp_mas_comet } echo '</div>'; //endif; }
function news_relacionados($titulo) { $cates = current_category(); $args = array('cat' => $cates, 'showposts' => 2, 'orderby' => 'date', 'order' => 'DESC'); $ncomentario = get_comments_number(); ?> <div class="conternedor"> <div class="row"> <?php $que_posts = new WP_Query($args); while ($que_posts->have_posts()) { $que_posts->the_post(); ?> <div class="news_content large-6 medium-6 small-12 columns"> <div class="news large-12 medium-12 small-12 columns reset"> <div class="large-12 medium-12 small-12 columns fondo_news"> <div class="large-12 medium-12 small-12 columns imagen"> <?php echo '<a href="'; the_permalink(); echo '">'; the_post_thumbnail('mas_comentados'); echo '</a>'; ?> </div> </div> <div class="large-12 medium-12 small-12 columns titulo_news"> <?php echo '<a href="'; the_permalink(); echo '">'; the_title(); echo '</a>'; ?> </div> <?php printf(__('<a href="%1$s" rel="bookmark"><span class="calendar"></span><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a>', 'themename'), get_permalink(), get_the_date('c'), get_the_date(), get_author_posts_url(get_the_author_meta('ID')), sprintf(esc_attr__('Ver por %s', 'themename'), get_the_author()), get_the_author()); ?> <div class="large-12 medium-12 small-12 columns descripcion_news"> <?php the_content_limit('40'); /*the_excerpt_rss();*/ ?> <?php wp_link_pages(array('before' => '<div class="page-link">' . __('Pages:', 'themename'), 'after' => '</div>')); ?> </div> </div> </div> <?php } ?> </div> </div> <?php }