Support » Themes and Templates » Style changes for index vs. page created with template copied from index.php?

  • When creating a page template (new.php) by duplicating the index.php code and then creating a page using the new.php template, why does the style look different from the index page itself? If new.php is renamed and used as the index.php (and the template named removed) the styles of the new index look fine. I’m not understanding the application of styles to the page as it appears in the context of the index vs. a page created with a template based on the same code. How can I make the new page based on the new.php template look like the index page (same blog formatting etc.)?

Viewing 1 replies (of 1 total)
  • Clarification: The following code yields different a style appearance when pasted into either index.php or new.php (the new page template)…

    <?php get_header() ?>

    <div id=”container”>
    <div id=”content” class=”hfeed”>

    <?php while ( have_posts() ) : the_post(); ?>

    <div id=”post-<?php the_ID() ?>” class=”<?php barthelme_post_class() ?>”>
    <div class=”post-container”>
    <div class=”post-content”>
    <h3 class=”entry-title”>” title=”<?php printf(__(‘Permalink to %s’, ‘barthelme’), wp_specialchars(get_the_title(), 1)) ?>” rel=”bookmark”><?php the_title() ?></h3>
    <div class=”entry-content”>
    <?php the_excerpt(‘<span class=”more-link”>’.__(‘Continue reading ›’, ‘barthelme’).'</span>’) ?>

    <div class=”entry-meta”>
    <span class=”entry-date”>”><?php unset($previousday); printf(__(‘%1$s’, ‘barthelme’), the_date(‘Y m d’, false)) ?></span>
    <?php if ( !is_author() ) : ?><?php barthelme_author_link(); ?><?php endif; ?>
    <span class=”entry-category”><?php if ( !is_category() ) { echo the_category(‘<br/>’); } else { $other_cats = barthelme_other_cats(‘<br/>’); echo $other_cats; } ?></span>
    <span class=”entry-comments”><?php comments_popup_link(__(‘Comments (0)’, ‘barthelme’), __(‘Comments (1)’, ‘barthelme’), __(‘Comments (%)’, ‘barthelme’)) ?></span>
    <?php edit_post_link(__(‘Edit’, ‘barthelme’), “\t\t\t\t\t<span class=’entry-edit’>”, “</span>\n”); ?>

    <?php endwhile ?>


    <?php get_sidebar() ?>
    <?php get_footer() ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Style changes for index vs. page created with template copied from index.php?’ is closed to new replies.