WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Alternative to Show Category Posts (5 posts)

  1. macmiller
    Member
    Posted 6 years ago #

    I just updated to version 2.3.1 and found that the Show Category Post no longer works. I had code embedded in my main site page (not the wordpress blog) to show the most recent posts using this plugin.

    All I really need to do is show the most recent posts of some predefined number along with an indicator of the number of comments.

    What is the best and easiest method to do this (add code to my non blog homepage to show a list of recent posts)?

  2. MichaelH
    Member
    Posted 6 years ago #

    Moshu has the CQS plugin ready for 2.3.1 at http://www.transycan.net/blogtest/cat/wp-plugins/ that can do that job.

  3. macmiller
    Member
    Posted 6 years ago #

    I looked at that plug in and am not sure if it is what I need or not. I have code in my main non-blog homepage which needs to be replaced due to the fact that the original show_categories_posts plugin isn't working in 2.3.1. I did look at CQS a bit, but don't see any instructions on what to add to replace this following code. Are there any examples out there?

    The following is code embedded in my non-blog homepage to show a list of recent posts.

    Most recent entries -
    <font face="Verdana" size="1">
    <div id="leftcol">
    <ul><br> <li><?php echo show_category_posts('category=2&scp_status=publish&scp_title=latest blog articles&scp_limit=8'); ?></li>
    <ul compact >
    <?php if ($scp_posts) : foreach ($scp_posts as $post) : start_wp(); ?>
    <li><?php the_time('M jS ',TRUE);?><span class=topicslinkcss><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></span>&nbsp;<?php echo $post->post_excerpt ?>
    <span class="sidecomments">
    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?></span></li>
    <?php endforeach; ?>
    </ul>
    <?php else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
     <?php endif; ?>
    </ul>
    </div>
    </font>
    </td>
  4. MichaelH
    Member
    Posted 6 years ago #

    With CQS not necessary to 'code' anything. Just make your 'settings' in Options->CQS.

  5. macmiller
    Member
    Posted 6 years ago #

    Thanks for the suggestions.

    The easiest way I found to get what I wanted was a minor tweak to a small plug-in recently updated posts. It has the advantage of only needing one line added to my non blog home page and includes parameters to limit the number of posts. The tweaks are on the following related link.

    http://wordpress.org/support/topic/148957?replies=1

    The CQS method wouldn't work because code needs to be added into the non-blog page to get it to pull in the recent posts.

Topic Closed

This topic has been closed to new replies.

About this Topic