• Hello
    i’m trying to make a page template that gets posttitles and permalinks out of a certain cateory under the static homepage content.

    Can someone help to debug the code below. It results in unexpected $end.

    TIA

    <?php get_header(); ?>
    
    <div id="content" class="narrowcolumn">
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <h2><?php the_title(); ?></h2>
    <div class="entry">
    <?php the_content('<p class="serif">Read the rest of this page ?
    '); ?>
    
    <?php wp_link_pages(array('before' => 'Pages: ', 'after' => '
    ', 'next_or_number' => 'number')); ?>
    
    </div>
    <?php if (is_page('Home'));?>
    <?php $posts = get_posts( "category=1&numberposts=6" ); ?>
    <?php if( $posts ) : ?>
    <?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
    " rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?>
    </div>
    
    </div>
    </div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    Edit by Otto: Attempted to fix backticks, but some of the post was already lost. Recommend using pastebin instead.

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘What is wrong with this page template?’ is closed to new replies.