Support » Fixing WordPress » Limit # of times a post displays?

  • I have a query that shows the most recent 7 posts from a set of categories (offset by 7 that display elsewhere on the page). However, if a post is tied to multiple categories, that post shows up multiple times within the query… is there a way to prevent this from happening. Here’s my pastebin:

    http://pastebin.com/iXbZyuN3

    Any help would be great!

Viewing 5 replies - 1 through 5 (of 5 total)
  • <?php query_posts('post_type=knowledgebase&showposts=10&offset=7&orderby=date&perm=readable'); ?>

    Replace showposts with posts_per_page (showposts is deprecated). What on earth is perm? I also cannot see any argument to only select posts from a set of specified categories. Only an argument to select a particular custom post type.

    Thread Starter Sarah_Frantz

    (@sarah_frantz)

    here is more from that code, with showposts replaced.

    pastebin

    Thread Starter Sarah_Frantz

    (@sarah_frantz)

    perm=readable only gathers posts that are not marked private

    There is no such argument for query_posts(). A list of all of the available arguments can be found here.

    Thread Starter Sarah_Frantz

    (@sarah_frantz)

    I will be sure to update my query, however any insight in avoiding duplicate posting across the sections would be much appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Limit # of times a post displays?’ is closed to new replies.