Forums

count query_posts (2 posts)

  1. No_Ob
    Member
    Posted 2 years ago #

    Hi All,

    How do i count how many posts there are in query_posts ?

    I want to create

    if (have_posts()) {
    	if ($myposts >= 50) {

    But dont know how to give $myposts the amount of posts here....

    Thanks!

  2. alchymyth
    The Sweeper
    Posted 2 years ago #

    try:
    $myposts = $wp_query->post_count;

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.