Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/01/2010, 14:39
alvarols
 
Fecha de Ingreso: diciembre-2008
Mensajes: 738
Antigüedad: 16 años, 3 meses
Puntos: 15
Como hacer que wordpress me muestre el blog en una página que no es inicio

Tengo una duda, es que para el sitio que estoy haciendo reservé el index.php para hacer un portal, y decidí mover lo que es el blog a otra sección. Lo que hice fué copiar el código del archivo index.php y renombrarlo como blog.php.

En la sección de páginas estáticas hice una página nueva llamada "artículos" y le asigné la plantilla de blog.php para que trabajara con esa, pero al parecer no hace el loop para que me muestre los artículos. ¿Que es lo que tengo que hacer?.

El sitio es este: www.ciudadfamilia.org.mx

Lo que quiero lograr es lo que hace esta página:
http://bizzartic.com/bizzthemes/berita/category/blog/

Este es el código:

Código PHP:
<?php

/*
Template Name: Snarfer
*/

get_header();
?>
            <!--BEGIN #primary .hfeed-->
            <div id="primary" class="hfeed">
            <?php if ( have_posts() ) : ?>
                <?php while ( have_posts() ) : the_post(); ?>

                <!--BEGIN .hentry-->
                <div id="post-<?php the_ID(); ?>" class="<?php semantic_entries(); ?>">
                    <h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>

                    <!--BEGIN .entry-meta .entry-header-->
                    <div class="entry-meta entry-header">
                        <span class="author vcard">Escrito por <?php printf'<a class="url fn" href="' get_author_posts_url$authordata->ID$authordata->user_nicename ) . '" title="' sprintf'View all posts by %s'$authordata->display_name ) . '">' get_the_author() . '</a>' ?></span>
                        <span class="published">on <abbr class="published-time" title="<?php the_timeget_option('date_format') .' - 'get_option('time_format') ); ?>"><?php the_timeget_option('date_format') ); ?></abbr></span>
                        <span class="meta-sep">&mdash;</span>
                        <span class="comment-count"><a href="<?php comments_link(); ?>"><?php comments_number'Deja un comentario''1 Comentario''% Comentarios' ); ?></a></span>
                        <?php edit_post_link'edit''<span class="edit-post">['']</span>' ); ?>
                    <!--END .entry-meta .entry-header-->
                    </div>

                    <!--BEGIN .entry-content .article-->
                    <div class="entry-content article">
                        <?php the_excerpt(); ?>
                        <a href="<?php the_permalink() ?>" rel="bookmark" style="font-style:italic;" title="Permanent Link to <?php the_title(); ?>">Continuar Leyendo...</a>
                        <?php wp_link_pages( array( 'before' => '<div id="page-links"><p><strong>Pages:</strong> ''after' => '</p></div>''next_or_number' => 'number' ) ); ?>
                    <!--END .entry-content .article-->
                    </div>

                    <!--BEGIN .entry-meta .entry-footer-->
                    <div class="entry-meta entry-footer">
                        <span class="entry-categories"><br />Escrito en <?php echo framework_get_terms'cats' ); ?></span>
                        <?php if ( framework_get_terms'tags' ) ) { ?>
                        <span class="meta-sep">|</span>
                        <span class="entry-tags">Taggeado <?php echo framework_get_terms'tags' ); ?></span>
                        <?php ?>
                    <!--END .entry-meta .entry-footer-->
                    </div>
                <!--END .hentry-->
                </div>

                <?php endwhile; ?>
                <?php include ( TEMPLATEPATH '/navigation.php' ); ?>
                <?php else : ?>

                <!--BEGIN #post-0-->
                <div id="post-0" class="<?php semantic_entries(); ?>">
                    <h2 class="entry-title">No encontrado</h2>

                    <!--BEGIN .entry-content-->
                    <div class="entry-content">
                        <p>Disculpa, estas buscando algo que no está aquí.</p>
                        <?php get_search_form(); ?>
                    <!--END .entry-content-->
                    </div>
                <!--END #post-0-->
                </div>

            <?php endif; ?>
            <!--END #primary .hfeed-->
            </div>

<?php get_sidebar(); ?>
<?php get_footer
(); ?>

Última edición por alvarols; 22/01/2010 a las 14:50