WordPress.org

Ready to get started?Download WordPress

Forums

Page Templates (2 posts)

  1. EricAlmighty
    Member
    Posted 9 years ago #

    I am currently using the Relaxation theme (you can see the design at http://www.almightydung.cerenthia.net/?page_id=4) and I'm trying to make it so the sidebar part of the layout design on the far right is "attached". I've modified the Top, Bottom, and Middle images to my liking and have created new classes in the style.css. I also made a new header and Footer PHP file.

    After all this I still don't see any changes in the Page. The sidebar is gone now but the images aren't changing. My Page template looks like this:

    <?php get_header(header1.php); ?>

    <div id="content">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class="post">
    <h1 id="post-<?php the_ID(); ?>"><?php the_title(); ?></h1>
    <div class="entrytext">
    <?php the_content('<p class="serif">Read the rest of this page »'); ?>

    <?php link_pages('Pages: ', '', 'number'); ?>

    </div>
    </div>

    <?php endwhile; endif; ?>
    <?php edit_post_link('Edit this entry.', '', ''); ?>

    </div>

    </div>

    <?php get_footer(footer1.php); ?>

    Does anyone know how I can get the images to change? I've changed the PHP values in both new header and footer documents to match the new image classes in the CSS. So instead of the regular middle, top, and bottom images the values should show the new ones. I hope this isn't too confusing

  2. moshu
    Member
    Posted 9 years ago #

    1. It's time to learn how to post code: see the instructions below the text area when you post!
    2. get_header and get_footer are functions that work only with the header.php and footer.php files.
    If you want to include files with different names (and header1.php is a different name!) - you have to use regular PHP includes. You could try:
    <?php include (TEMPLATEPATH . '/header1.php'); ?>
    Note. It should be used literally as it is, "TEMPLATEPATH" is recognized by WP as the path to your theme.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.