Results 1 to 2 of 2
Thread: Moving index.php to archive.php
Apr 12, 2011, 20:01 #1
- Join Date
- Aug 2008
- 0 Post(s)
- 0 Thread(s)
Moving index.php to archive.php
I customized my wordpress front page to show some images but no postings.
instead, i am trying to moved the "show latest post" to another page which will be "news archive".
I try to do this simply by copying the original index.php code to another template file which is archiving.php
Using Twenty Ten theme btw.
I assign a page i created called News Archive with the template archiving.php.
Problem is, the posts doesn't show up like its suppose to. Where did i go wrong?
The code from the index.php (copied to archiving.php)
* The main template file.
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
<div id="content" role="main">
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
get_template_part( 'loop', 'index' );
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Apr 13, 2011, 02:25 #2
- Join Date
- Nov 2004
- Truly Asia
- 1 Post(s)
- 1 Thread(s)
Why not use the static page feature?
Settings>> Reading >> Front Page