Day 31 - PitchEngine/code-wyoming GitHub Wiki
-
get_header()
forheader.php
-
get_sidebar()
forsidebar.php
-
get_footer()
forfooter.php
wp_head()
wp_footer()
wp_meta()
esc_attr()
the_title_attribute()
wp_title
-
container
('div') container_class
container_id
menu_class
menu_id
theme_location($slug)
register_nav_menu($slug, $user_friendly_description)
(functions.php)
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<!-- loop it up! -->
<?php endwhile; else: ?>
<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?>
See template tags for the full documentation on what you can do in The Loop.
the_permalink()
-
the_title()
orthe_title('before', 'after')
the_title_attribute()
the_time()
the_author()
<h2 id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<?php the_title(); ?></a></h2>
<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
<?php the_tags( $before, $sep, $after ); ?>
the_content('Read more link text')
<?php the_content("Continue reading " . the_title('', '', false)); ?>
Strips HTML (including imgs) and cuts down to 55 words. No readmore link.
<?php if ( is_category() || is_archive() ) {
the_excerpt();
} else {
the_content();
} ?>
<?php if ( have_posts() ) : ?>
<!-- Add the pagination functions here. -->
<!-- Start of the main loop. -->
<?php while ( have_posts() ) : the_post(); ?>
<!-- the rest of your theme's main loop -->
<?php endwhile; ?>
<!-- End of the main loop -->
<!-- Add the pagination functions here. -->
<div class="nav-previous alignleft"><?php next_posts_link( 'Older posts' ); ?></div>
<div class="nav-next alignright"><?php previous_posts_link( 'Newer posts' ); ?></div>
<?php else : ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
-
_s, 'underscores' and here's an intro to underscores
-
ps: check out the "recommended plugins" at the bottom of roots!
-
bones minimal, less frameworky