PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Dynamic Population - Limit on # of posts?

  1. I have followed the instructions at the How To for dynamically populating drop down fields. I have tried adjusting the code and can't get it to pull all posts under the category I wish.

    Here is the line of code

    $posts = get_posts("cat=4&showposts=-1");

    It is pulling the posts but not all

    The form can be seen at

    http://www.raisedonindie.com/submit-music-video/

    and the drop down in question is under Artist

    thanks

    Brian

    Posted 12 years ago on Saturday December 31, 2011 | Permalink
  2. How many posts are there in that category, and how many are showing up in the drop down? Looks like about 100 show up in the drop down, but how many should there be, and is there any pattern to the ones which are missing?

    Posted 12 years ago on Monday January 2, 2012 | Permalink
  3. Looks to be 100 - posts are listed in alphabetical order. There are currently 139 posts in that category. As a new post is added that would alphabetically fall within the first 100 posts another post drops off the bottom.

    Posted 12 years ago on Thursday January 5, 2012 | Permalink
  4. Hi RaisedonIndie,

    I did a test on my local machine and was unable to recreate this issue. Are all 139 posts in that category published? Was the "showposts" parameter you included in your code example above a typo? It should be "numberposts".

    Assuming you are using something similar to the code in the tutorial to get the posts, try echoing out the count of the returned $posts. This will help you pin point whether there is a conflict with how you are retrieving them vs a conflict with how GF is handling the posts you've retrieved.

    [php]
    echo count($posts);
    Posted 12 years ago on Thursday January 5, 2012 | Permalink