WordPress.org

Ready to get started?Download WordPress

Forums

Include template before a loop (1 post)

  1. atali
    Member
    Posted 2 years ago #

    This is my category / archive page

    i want to include a template before loop

    but i cant get posts based on category, it showing latest post only on every page.

    when i removed this line before the loop

    <?php include( TEMPLATEPATH . '/includes/tb/hot_posts.tpl.php' ); ?>
    it work smoothly, but i need this template before the loop

    this is code (archive / category )

    <div class="Hot_post">

    <?php include( TEMPLATEPATH . '/includes/tb/hot_posts.tpl.php' ); ?>

    <?php if (have_posts()) : $count = 0; ?>
    and this is code from template (includes/tb/hot_posts.tpl.php)

    `<?php query_posts('meta_key=post_views_count&order=DESC'); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> `
    please guide me

Topic Closed

This topic has been closed to new replies.

About this Topic