Categories are not displayed.
-
When using a post_type category, these are not shown.
That is, only shows the normal post.
<?php get_header(); ?> <div id="content"> <?php if (have_posts()) : ?> <?php if (is_category()) { ?> <p class="browse">Estás en: Inicio // <?php single_cat_title(); ?></p> <?php } elseif (is_author()) { ?> <p class="browse">Archivos del autor</p> <?php } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <p class="browse">Archivos del blog</p> <?php } ?> <?php while (have_posts()) : the_post(); ?> <div id="post"> <span class="categorias"> <?php foreach((get_the_category()) as $category) { echo '<li class="cat-item-' .$category->term_id. '"><a href="'.get_category_link($category->term_id ).'">' . $category->cat_name . '</a></li>'; } ?> </span><span class="date"><?php the_time('d/m/Y') ?></span> <div id="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Visitar <?php the_title_attribute(); ?>"><?php the_title(); ?></a></div> <div id="postcontent"><a href="<?php the_permalink() ?>"><?php the_post_thumbnail( 'thumbnail' ); ?></a><?php the_excerpt() ?></div> <div class="clear"></div> </div> <?php endwhile; ?> <div class="clear"></div> <div id="navigation"> <div class="previous"><?php previous_posts_link( __( 'Anterior' ) ); ?><div class="clear"></div></div> <div class="next"><?php next_posts_link( __( 'Siguiente' ) ); ?><div class="clear"></div></div> </div> <?php else : ?> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
- The topic ‘Categories are not displayed.’ is closed to new replies.