• My existing template uses intro.php that puts at the top of the page above the post but the new template I have doesn’t have a intro.php file and just shows the lastest post at the top. I would like to put intro.php into the new template but not sure how. Anyone done this before?

Viewing 2 replies - 1 through 2 (of 2 total)
  • In some themes that would be done with an include statement in a theme’s index.php:

    <?php include (TEMPLATEPATH . "/intro.php"); ?>

    Or it might be done with a function (in your functions.php)

    <?php
    if (function_exists('my_intro_function')) {
    my_intro_function();
    }
    ?>

    Thread Starter mythaimedia

    (@mythaimedia)

    Thanks but where would I put that line? I tried the top but it distorted it and i tried under the header but still look bad. Below is my index.php page:

    <?php get_header(); ?>

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

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

    <div <?php post_class() ?> id=”post-<?php the_ID(); ?>”>
    <h1>” rel=”bookmark” title=”<?php _e(‘Permanent Link to’, ‘default’); ?> <?php the_title_attribute(); ?>”><?php the_title(); ?></h1>
    <small class=”meta clearfix”>
    <span class=”alignleft”>
    <?php the_date(”) ?> <!– by <?php the_author() ?> –> <?php edit_post_link(__( ‘Edit’, ‘default’ ), ‘ | ‘, ”); ?>
    </span>

    Purchase »

    </small>

    <div class=”entry”>
    <?php the_content((__( ‘» Read more: ‘, ‘default’)) . the_title(”, ”, false)); ?>
    </div>

    <div class=”postmetadata clearfix”>
    <p class=”commentslink alignright”>
    ” rel=”nofollow”><?php comments_number( __( ‘No comments’, ‘default’ ), __( ‘1 comment’, ‘default’ ), __( ‘% comments’, ‘default’ )); ?> »
    </p>
    <p class=”categories”>
    <?php _e( ‘Posted in ‘, ‘default’ ); the_category(‘, ‘); ?>
    </p>
    <?php the_tags( ‘<p class=”tags”>Tags: ‘, ‘ ‘, ‘</p>’); ?>
    </div>
    </div>

    <?php endwhile; ?>

    <div class=”pagination navigation clearfix”>
    <?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); } else { ?>
    <div class=”alignleft”><?php next_posts_link(__(‘« Older Entries’, ‘default’)) ?></div>
    <div class=”alignright”><?php previous_posts_link(__(‘Newer Entries »’, ‘default’)) ?></div>
    <?php } ?>
    </div>

    <?php else : ?>

    <?php include (TEMPLATEPATH . “/missing.php”); ?>

    <?php endif; ?>

    </div><!– #content –>
    </div><!– #container –>

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘intro.php’ is closed to new replies.