• Resolved jcrich53

    (@jcrich53)


    I am trying to figure out how to have a series of featured posts that would appear on a static page on my WP blog.

    I have found a number of plugins that will enable me to list the post title of posts from a particular category (e.g. Catlist plugins). However, what I want is the capacity to include the intro paragraph (everything before the “read more” break) to be included.

    Any suggestions on doing this?

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Try this:

    <?php
       $args=array(
       'cat'=>1,
       'showposts'=>10,
       'caller_get_posts'=>1
       );
    $my_query = new WP_Query($args);
    if( $my_query->have_posts() ) {
    while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <p><small><?php the_time('m.d.y') ?></small> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
    
    <?php
    global $more;
    $more=0;
    the_content('Read the rest of this entry &raquo;');
    <?php
    endwhile;
    }

    Thread Starter jcrich53

    (@jcrich53)

    Thanks.

    Where should I place this? (What file?)

    It could be your theme’s index.php or it could be a Page Template.

    With the help of the Template Hierarchy article, determine what Template is ‘in force’ where you want to display that featured post info.

    Also, if you use the technique described in the FAQ, How can I have a static front page and posts display on a page called Blog? , you would put that code in the myfront.php template described in that FAQ.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display featured Posts on Page and adhere to ‘the more’’ is closed to new replies.