Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/12/2010, 17:30
Canopix1
 
Fecha de Ingreso: noviembre-2010
Ubicación: Santa Fe capital
Mensajes: 30
Antigüedad: 13 años, 6 meses
Puntos: 0
Determinadas Categorias en Pagina Principal

Hola foreros! Lo unico que quiero es que en la pagina principal, solo aparescan determinadas categorias, y que si es de una categoria excluida que este en su categoria como corresponde..

Esto es lo que tengo mas o menos pero no anda:


Código:
	<?php if (have_posts()) : ?>

		<?php while (have_posts()) : the_post(); ?>
                             
			<div class="box post" id="post-<?php the_ID(); ?>">
				<div class="content">
					<?php $postimageurl = get_post_meta($post->ID, 'post-img', true); if ($postimageurl) { ?>
                    <div class="pic fl">
                      <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src="<?php echo $postimageurl; ?>" alt="Post Pic" width="200" height="200" /></a>
                    </div>
					<?php } ?>
					<div class="post-title">
						<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
					</div>
					<!--/post-title -->
					<div class="post-date"><em>El <?php the_time('m.d.y'); ?>, En <?php the_category(', ') ?>, Escrito por:  <?php the_author_posts_link(); ?></em></div>
					<div class="post-excerpt"><?php the_excerpt(); ?></div>
					<!--/post-excerpt -->
				</div>
				<!--/content -->
				<div class="hl"></div>
				<div class="social-links">
					<div class="fl">
						<span><?php comments_number(0, 1, '%'); ?></span>
						<a href="<?php the_permalink(); ?>#Comentarios" title="Ver Comentarios">Comentarios</a>
					</div>
					<div class="fr"><span><a href="<?php the_permalink(); ?>#respond" title="Alentame con un comentario!">Alentame con un comentario!</a></span></div>
					<br class="fix" />
				</div>
				<!--/social-links -->
			</div>
			<!--/box -->

		<?php endwhile; ?>
En la parte que dice asi:

Código:
<?php if (have_posts()) : ?>

		<?php while (have_posts()) : the_post(); ?>

Quiero poner un IF referente a la categoria del post que se este por poner en el index.php pero no logro hacerlo, pense en cambiarlo de esta forma:

Código:
if (query_posts('cat=1')) {
   <?php while (have_posts()) : the_post();?>
pero no logro hacerlo.. Nose si es porque no lo estoy programando bien al index.php o no puedo ponerlo bien..

Nose si va tambien con el <?php endif();?> identado al mismo nivel que el if que determina la categoria..

pero quiero arreglarlo de modo que SE PUEDAN PONER EN LA PAGINA PRINCIPAL SOLO ESAS CATEGORIAS DEFINIDAS... SON VARIOS NUMEROS..