Created
July 5, 2020 03:51
-
-
Save ivanteoh/cb0e88bf90213ba9adcf8de9b8c436d4 to your computer and use it in GitHub Desktop.
WordPress Theme Development 2 - Minimum Main Index Template
This file contains hidden or 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 | |
| /** | |
| * @package WordPress | |
| * @subpackage Your_Theme | |
| */ | |
| get_header(); ?> | |
| <?php if (have_posts()) : ?> | |
| <?php while (have_posts()) : ?> | |
| <?php the_post(); ?> | |
| <div <?php post_class(); ?> id="post-<?php the_ID(); ?>"> | |
| <h2><a href="<?php the_permalink() ?>" rel="bookmark" | |
| title="Permanent Link to <?php the_title_attribute(); ?>"> | |
| <?php the_title(); ?></a></h2> | |
| <?php the_content(__('Read more...')); ?> | |
| <p><?php wp_link_pages(); ?></p> | |
| <p><?php _e('Posted by'); ?> <?php the_author(); ?> @ | |
| <?php the_time('F jS, Y'); ?> <?php _e('in'); ?> | |
| <?php the_category(','); ?> <?php the_tags(__('with '), ', '); ?></p> | |
| <p><?php comments_popup_link(__('No Comments »'), | |
| __('1 Comment »'), __('% Comments »')); ?> | |
| <?php edit_post_link(__('Edit This'), '—'); ?></p> | |
| </div> | |
| <?php comments_template(); ?> | |
| <?php endwhile; ?> | |
| <p><?php next_posts_link(__('« Older Posts')); ?></p> | |
| <p><?php previous_posts_link(__('Newer Posts »')); ?></p> | |
| <?php else : ?> | |
| <h2><?php _e('Not Found'); ?></h2> | |
| <p><?php _e('Sorry, but you are looking for something that isn't here.'); ?> | |
| </p> | |
| <?php endif; ?> | |
| <?php get_sidebar(); ?> | |
| <?php get_footer(); ?> |
This file contains hidden or 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(); | |
| if (have_posts()) : | |
| while (have_posts()) : | |
| the_post(); | |
| the_content(); | |
| endwhile; | |
| endif; | |
| get_sidebar(); | |
| get_footer(); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment