Created
June 16, 2018 06:33
-
-
Save garagemwp/07d70f87c9b91a56a2371aca9393327a to your computer and use it in GitHub Desktop.
Exemplo básico de um template de página inicial para WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<div id="page" class="site"> | |
<header> | |
<h1><?php bloginfo( 'name' ); ?></h1> | |
</header> | |
<?php if ( have_posts() ) : ?> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<article <?php post_class(); ?>> | |
<?php the_title('<h2>','</h2>'); ?> | |
<p><?php echo get_the_date(); ?></p> | |
<?php the_post_thumbnail( 'thumbnail' ); ?> | |
<?php the_excerpt(); ?> | |
<a href="<?php echo get_permalink(); ?>">Leia mais</a> | |
</article> | |
<?php endwhile; ?> | |
<?php echo paginate_links(); ?> | |
<?php endif; ?> | |
</div> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment