Añadir categoria index noticias
-
hola estoy intentado poner una categoria en la pagina principal de las noticias pero no lo consigo e puesto ya bastantes codigos y plugins y no funciona
la categoria es estrenos y me gustaria que apareciera en la parte superior de los ultimos videos
<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/get_header();
?>
<!-- content -->
<div id="content" class="narrowcolumn"><h1 class="main_title">Ultimos Videos</h1>
<?php if (have_posts()) : ?>
<div id="videos">
<?php $i=0; while (have_posts()) : the_post(); $i++; ?>
<!-- post -->
<div class="video<?php if($i%4==0) : ?> video_last<?php endif; ?>" id="video-<?php the_ID(); ?>">
<h2>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php echo thman_get_limited_string($post->post_title,15); ?></h2>
<div class="thumb">
" title="<?php the_title_attribute(); ?>"><?php $thumb = thman_getcustomfield('thumb',get_the_ID()); if(!empty($thumb)) : ?>
<img src="<?php echo $thumb; ?>" alt="<?php the_title_attribute(); ?>" />
<?php else : ?>
<img src="<?php bloginfo('template_url'); ?>/images/pic_empty.gif" alt="<?php the_title_attribute(); ?>" />
<?php endif; ?>
</div>
<div class="info">
<div class="info_left">
<p class="duration"><?php $duration = thman_getcustomfield('duration',get_the_ID()); if(empty($duration)) $duration = 'Votos'; echo $duration; ?></p>
<?php if(function_exists('the_views')) { ?><p class="Visto"><?php the_views(); ?></p><?php } ?>
<p class="author"><?php the_author() ?></p>
</div>
<div class="info_right">
<?php if(function_exists('the_ratings')) { ?><div class="rating"><?php the_ratings(); ?></div><?php } ?>
</div>
</div>
</div>
<?php if($i%4==0) : ?><div class="clear"></div><?php endif; ?>
<!-- /post -->
<?php endwhile; ?>
</div>
<?php
$next_page = get_next_posts_link('Previous');
$prev_pages = get_previous_posts_link('Next');
if(!empty($next_page) || !empty($prev_pages)) :
?>
<!-- navigation -->
<div class="navigation">
<?php if(!function_exists('wp_pagenavi')) : ?>
<div class="alignleft"><?php echo $next_page; ?></div>
<div class="alignright"><?php echo $prev_pages; ?></div>
<?php else : wp_pagenavi(); endif; ?>
</div>
<!-- /navigation -->
<?php endif; ?><?php
else :
?><p class="nopost">Sorry, but you are looking for something that isn't here.</p><?php
endif;
?></div>
<!-- /content --><?php get_sidebar(); ?>
<?php get_footer(); ?>
-
Hola,
Lo siento, no estas en el foro adecuado: 8 cosas que debes leer antes de postear en el foro (primer punto).
Saludos
-
lo siento gracias intentare postear en el foro adecuado en el proximo post
referente a la pregunta que e realizado
e intentado añadir varios codigos por ejemplo este y no funciona
<?php query_posts('posts_per_page=4&category_name=estrenos');if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2>" rel="bookmark"><?php the_title(); ?></h2>
<?php the_content('Leer el resto del artículo'); ?><?php endwhile; else: ?>
<?php endif; ?>
<?php if(function_exists('wp_paginate')) {
wp_paginate();
} ?>
<?php wp_reset_query(); ?>las noticias ban con thumb asi que supongo que ay que añadir codigos adicionales
-
Hola, como te dijo @jesusbenja estás preguntando en el foro equivocado: este es sólo para blogs alojados en WordPress.com y tu página no lo está.
Por favor lee su respuesta atentamente y ve a un foro adecuado.
Gracias.
- El debate ‘Añadir categoria index noticias’ está cerrado y no admite más respuestas.