fisiere starkers

contine templaturile

index.php

header.php

footer.php

page.php

——page

<?php get_header(); ?>

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div id="post-<?php the_ID(); ?>">

        <h2><?php the_title(); ?></h2>

        <?php the_content('<p>Read the rest of this page &raquo;</p>'); ?>

     </div>
<?php endwhile; endif; ?>

<?php get_sidebar(); ?>

<?php get_footer(); ?>




------footer


    <?php wp_footer(); ?>

    </body>

</html>

------------header

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head profile="http://gmpg.org/xfn/11">
       <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

       <title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title> //titlul paginii, gestionat dinamic

       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />//returneaza calea dinamic pentru folderul unde se afla fisierele de stil
       <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

       <?php wp_head(); ?>
</head> //se termina head-ul paginii

<body <?php body_class(); ?>> incepe corpul body al paginii

       <h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1> // afiseaza numele blogului
       <p><?php bloginfo('description'); ?></p> // si imediat dedesubt descrierea asa cum apare pe fiecare pagina de obicei in coltul de stanga sus

-------------index

<?php get_header(); ?> // preia header.php

  <?php if (have_posts()) : ?> //verifica daca sunt post-uri

    <?php while (have_posts()) : the_post(); ?>//cat timp sunt post-uri le preia si urmeaza afisarea fiecaruia

          <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> //in urmatoarele 4 linii avem un div (obs clasa si id-ul) cu gestionarea post-ului:titlu, data, nume autor si afisarea continutului

              <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

              <p><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></p>

              <?php the_content('Read the rest of this entry &raquo;'); ?> // aici se afiseaza post-ul

          </div>

    <?php endwhile; ?>

       <?php next_posts_link('&laquo; Older Entries') ?>
    <?php previous_posts_link('Newer Entries &raquo;') ?>// link-uri la anteriorul post respectiv urmatorul

<?php else : ?> // un else care nu face nimic acum dar poate face daca dorim sa adaugam functionalitate in caz ca nu sunt post-uri
<?php endif; ?>
<?php get_sidebar(); ?> //preia sidebar.php
<?php get_footer(); ?>// preia footer.php

---------------