WordPress.org

Ready to get started?Download WordPress

Forums

Posting On page (2 posts)

  1. saljoga2
    Member
    Posted 2 years ago #

    Hi,

    I Just want to know if anyone has been able to display posts from a certain catatagory on a page in "Bussiness-lite" template.

    I have used the following code to generate my posts from a certain category on a page:

    <?php
    /*
    Template Name: PageOfPosts
    */
    get_header(); ?>
    <?php
    query_posts('catname=sample');
    while (have_posts()) : the_post();
    the_content();
    endwhile;
    ?>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    But I just cant display information such as author, date, time, etc... like the original template itself. I'll appreciate any help.

    Thanks,

  2. david.bailey
    Member
    Posted 2 years ago #

    Put this in the loop:

    <?php the_title('<h3>', '</h3>'); ?>

    the_title()

    <?php the_author(); ?>

    the_author()

    <?php the_date( $format, $before, $after, $echo ); ?>

    the_date()

Topic Closed

This topic has been closed to new replies.

About this Topic