Ver Mensaje Individual
  #7 (permalink)  
Antiguo 18/11/2013, 07:56
aldo_rengo
 
Fecha de Ingreso: febrero-2013
Ubicación: en mi casa
Mensajes: 541
Antigüedad: 11 años, 2 meses
Puntos: 3
Respuesta: duda wordpress archivo index.php

osea, yo me baje el wordpress , lo instale... etc..

viene con un par de themes... pero uso el Twenty Thirteen...

uno , tiene... index.php y page.php...


el archivo page.php tiene esto ..


Código PHP:
<?php
/**
 * The template for displaying all pages
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages and that other
 * 'pages' on your WordPress site will use a different template.
 *
 * @package WordPress
 * @subpackage Twenty_Thirteen
 * @since Twenty Thirteen 1.0
 */

get_header(); ?>

    <div id="primary" class="content-area">
        <div id="content" class="site-content" role="main">

            <?php /* The loop */ ?>
            <?php while ( have_posts() ) : the_post(); ?>

                <article class="juan" id="post-<?php the_ID(); ?><?php post_class(); ?>>
                    <header class="entry-header">
                        <?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
                        <div class="entry-thumbnail">
                            <?php the_post_thumbnail(); ?>
                        </div>
                        <?php endif; ?>

                        <h1 class="entry-title"><?php the_title(); ?></h1>
                    </header><!-- .entry-header -->

                    <div class="entry-content">
                        <?php the_content(); ?>
                        <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' __'Pages:''twentythirteen' ) . '</span>''after' => '</div>''link_before' => '<span>''link_after' => '</span>' ) ); ?>
                    </div><!-- .entry-content -->

                    <footer class="entry-meta">
                        <?php edit_post_link__'Edit''twentythirteen' ), '<span class="edit-link">''</span>' ); ?>
                    </footer><!-- .entry-meta -->
                </article><!-- #post -->

                <?php comments_template(); ?>
            <?php endwhile; ?>

        </div><!-- #content -->
    </div><!-- #primary -->

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

y el index.php... esto

Código PHP:
<?php
/**
 * The main template file
 *
 * This is the most generic template file in a WordPress theme and one of the
 * two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * For example, it puts together the home page when no home.php file exists.
 *
 * @link http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage Twenty_Thirteen
 * @since Twenty Thirteen 1.0
 */

get_header(); ?>

    <div id="primary" class="content-area">
        <div id="content" class="site-content" role="main">
        <?php if ( have_posts() ) : ?>

            <?php /* The loop */ ?>
            <?php while ( have_posts() ) : the_post(); ?>
                <?php get_template_part'content'get_post_format() ); ?>
            <?php endwhile; ?>

            <?php twentythirteen_paging_nav(); ?>

        <?php else : ?>
            <?php get_template_part'content''none' ); ?>
        <?php endif; ?>

        </div><!-- #content -->
    </div><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer
(); ?>
para empezar ambos llaman a header, sidebar, footer...

pero page.php tiene mas cosas...
pareciera que tiene como predeterminado cargar "page.php"

los comentarios los carga...
acaso desde el admin, cuando selecciono que no quiero comentarios... va a cargar index.php?? eso es=??

----------------
.....me pasa en wordpress. que pruebo algo y no sale... no entiendo nada... ja
por ejemplo esto de imprimir.. en index.o page....