WordPress 3.x para desarrolladores: Temas y plantillas, category.php, author.php, archive.php y 404.php
Estas son las últimas plantillas que crearemos para nuestro tema. CATEGORY.PHP Creamos el archivo category.php y añadimos el siguiente código: [codesyntax lang=»php»] <?php /** * The template for displaying Category Archive pages. * * @package WordPress * @subpackage New_Theme */ get_header(); ?> <section id="primary"> <div id="content" role="main"> <?php if ( have_posts() ) : ?>
WordPress 3.x para desarrolladores: Temas y plantillas, single.php y comments.php
Vamos con dos plantillas más, esta vez las que generan la página del post (single.php) y la de los comentarios (comment.php). SINGLE.PHP Creamos el archivo single.php y añadimos el siguiente código: [codesyntax lang=»php»] <?php get_header(); ?> <div id="primary"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <nav id="nav-single"> <h3 class="assistive-text"><?php _e(