Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/10/2011, 09:13
opzina
 
Fecha de Ingreso: marzo-2008
Mensajes: 1.020
Antigüedad: 16 años, 1 mes
Puntos: 21
Respuesta: (Wordpress) Enlace a contenido de post

Código PHP:
Ver original
  1. <?php
  2. /*
  3. Template Name: Noticias
  4. */
  5. ?>
  6. <?php get_header(); ?>
  7.  
  8. <div id="columns">
  9.   <div id="centercol">
  10.  
  11.     <?php $categorias = get_category('Noticias'); ?>
  12.  
  13.    
  14.        
  15.         <?php
  16.         global $post;
  17.         $args = array( 'numberposts' => 5, 'offset'=> 0, 'category' => 4 );
  18.         $myposts = get_posts( $args );
  19.         foreach( $myposts as $post ) :    setup_postdata($post); ?>
  20.            
  21.         <div class="post-title">
  22.             <h2><a href="<?php the_permalink(); ?>" rel="title" title="<?php the_title_attribute(); ?>"> <?php the_title(); ?> </a></h2>
  23.            
  24.         <div class="post-info">
  25.           <?php the_time('F, d, Y'); ?>
  26.           &bull;
  27.           <?php the_category(', ') ?>
  28.           &bull;
  29.           <?php the_author_posts_link(); ?>
  30.         </div>
  31.        
  32.         <!--/post-info -->
  33.        
  34.       </div>
  35.            
  36.            
  37.         <?php endforeach; ?>
  38.  
  39.   </div> <!--/centercol -->
  40.  
  41.  
  42.  <?php get_sidebar(); ?>
  43.  
  44.  
  45.   <div class="clr"></div>
  46. </div>
  47. <!--/columns -->
  48. <?php get_footer(); ?>
__________________
_