Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/12/2013, 05:56
pinguisport85
 
Fecha de Ingreso: mayo-2011
Mensajes: 101
Antigüedad: 13 años
Puntos: 5
Dudas con plantillas category-slug.php

Amigos del foro del Web

Solicito su ayuda , ya que estoy confeccionando mi primera plantilla y tengo algunas dudas no se si son errores y espero que me puedan ayudar......

Actualmente tengo 3 categorías "Noticias1", "Noticias2", "Noticias3" no son hijas de la 1, son independientes una de la otra. Cree una plantilla para cada una de las categorías y están llamadas con sus respectivos archivos los cuales son "category-noticia1.php", "category-noticia2.php", "category-noticia3.php"

Todo funcionan bien, llamadas con sus respectivos thumbnails. El problema o la duda que tengo es que cuando realizo el llamado por ejemplo a "category-noticia1.php" me muestra todas los post de categoría de las noticia 1 pero más los post de"Noticias2", "Noticias3" y me pasa con todos.

Mi condigo es el siguiente, la estructura es el mismo para todos. Solo cambio el Query:


Código PHP:
<?php get_header(); ?>

<div id="inner-content">
<div id="breadcrumb"><?php the_breadcrumbs(); ?></div>

<div class="left">
    
    <h1>Noticias 1</h1>
    <?php
        $noticia1 
= new WP_Query();
        
$noticia1-> query ('catgory_name=Noticia1&showposts=3'); 
    while (
$noticia1 -> have_posts() ) : $noticia1 -> the_post(); ?>

 <!-- entradas -->
<article class="news">

<div class="thumbnail-news">
<a href="<?php the_permalink(); ?>" class="fancybox" rel="gallery1" title="<?php the_title(); ?>">
<span id="hover-news"></span>
<?php if ( has_post_thumbnail() ) { the_post_thumbnail('homepage-thumb'); } ?></a>
</div>

<div class="post-text">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Enlace a <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<small>Publicado el <?php the_time('d F Y'); ?></small>

<div class="meta-news">
    <ul>
    <li class="category"><p><?php the_category(); ?></p></li>
    <li class="tags"><p><?php the_tags(); ?></p></li>
    <li class="user"><p><?php the_author_posts_link(); ?></p></li>
    </ul>
</div>

<div class="excerpt">
<?php echo get_excerpt(90); ?>
<a  class="leer-mas" href="<?php the_permalink(); ?>">Leer más &raquo;</a>
</div>
</div>
</article>
<?php endwhile; ?>

<!-- page-navigation -->
<?php next_posts_link("← Anterior ");?>
<?php previous_posts_link
("Siguiente →");?> 
<!--ENDS page-navigation -->

</div> <!-- END left -->

<!-- sidebar -->
<?php get_sidebar(); ?>

<div class="clearfix"></div>
</div><!-- END inner-content -->
<?php get_footer(); ?>