Template file for static page!
-
Hi,
I am trying to create a WordPress theme for the first time. I have successfully created an index, header, sidebar, footer and single template file.I would like to create a template file which applies only to static pages. At the moment the title, link and author are automatically added to the static pages in the same way as the posts. For every new static page I only want the title, without a link to show.
I made an attempt to create a page.php, that looks like this:
<?php /** * The Template for displaying all pages. * * @package WordPress * @subpackage ukulelenorge */ <?php get_header(); ?> <div id="box" <?php if( is_page() ) : ?> <div class="post"> <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> <div class="entry"> <?php the_content(); ?> </div> </div> <?php endwhile; ?> </div> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
This does not work – the various page does not appear when asked for!
How can I solve this?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Template file for static page!’ is closed to new replies.