WordPress.org

Ready to get started?Download WordPress

Forums

Exclude posts already used in two fields (2 posts)

  1. Halibutt
    Member
    Posted 4 years ago #

    Hello there. I'm trying to modify the Arthemia theme to suit my needs. The theme has three text windows: top left (headline), top right (featured) and main (front-list). In top left I have the latest post from one category, in top right - four latest posts from two other categories.

    In the main field I'd like to have 5 latest posts from all categories except the five already shown in top left and top right field.

    So far my php looks like this: http://codeviewer.org/view/code:db8

    The front-list in particular looks like this:

    <?php
    	$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    		query_posts("cat=-5&paged=$page&posts_per_page=5");
    		while (have_posts()) : the_post();
    		if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>

    It correctly excludes the latest post from headlines, but how do I make it also exclude the latest posts from featured?

    Thanks in advance for any help

  2. Halibutt
    Member
    Posted 4 years ago #

    Anyone? Pretty, pretty please...

Topic Closed

This topic has been closed to new replies.

About this Topic