Skip to content

Instantly share code, notes, and snippets.

@ivanteoh
Created July 5, 2020 07:45
Show Gist options
  • Save ivanteoh/ec8f82145b4abb93a7477d5f6181e179 to your computer and use it in GitHub Desktop.
Save ivanteoh/ec8f82145b4abb93a7477d5f6181e179 to your computer and use it in GitHub Desktop.
WordPress Theme Development 16 - Page Template
<?php
/**
* @package WordPress
* @subpackage Your_Theme
*/
get_header(); ?>
<div id="container">
<div id="content">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : ?>
<?php the_post(); ?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<div class="entry-title">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php
printf( __('Permalink Link to %s'), the_title_attribute('echo=0') );
?>"><?php the_title(); ?></a></h2>
</div><!-- .entry-title -->
<div class="entry-content">
<?php the_content(__('Read more...')); ?>
<p><?php wp_link_pages(); ?></p>
</div><!-- .entry-content -->
<div class="entry-meta">
<p><?php edit_post_link(__('Edit This')); ?></p>
</div><!-- .entry-meta -->
</div>
<?php endwhile; ?>
<?php else : ?>
<h2><?php _e('Not Found'); ?></h2>
<p><?php _e('Sorry, but you are looking for something that isn&#39;t here.');
?></p>
<?php endif; ?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment