WordPress.org

Ready to get started?Download WordPress

Forums

featured and latest articles are the same (3 posts)

  1. strnad
    Member
    Posted 5 years ago #

    Hello,

    I am using the "newsweek" theme which can be found here:
    http://premiumthemes.net/freethemes/newsweek.html

    My problem is that on fields "featured article" and "latest articles" I have the same article. The newest article I post is present as "featured" and also as "latest".

    What I need is to be the newest posted article as only "featured" and other articles should appear as "latest".

    Can you please help me with this problem?

    Thank you

    Sincerely

    Peter Strnad

  2. Len
    Member
    Posted 5 years ago #

    We can accomplish this by using the query_posts function. In that particular theme scroll down and find the Loop. It will look like,

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

    Immediately before that add the query_posts function ...

    <?php query_posts('showposts=5&offset=1'); ?>

    offset=1 will display posts after the most recent one while showposts= I think is obvious.

    More reading on query_posts.

  3. smcguire45
    Member
    Posted 5 years ago #

    Hi LenK,

    I tried your fix to no avail, is there possibly another work around or perhaps I could post the current code?

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic