This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Number of posts in post grid

  • Creator
    Topic
  • #3544
    odyn
    Participant

    I can’t seem to find, where I can set the number of shown posts in a post grid. Whatever I do it only shows 5 posts. My query is:

    [post_grid columns=”1″ rows=”20″ query=”post_status=future&cat=8&orderby=post_date&order=ASC&offset=0″]

    in the Settings/reading I have set to show 40 posts on blog pages. Is there another place where I should increase the number of posts?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #3568
    Jason Bobich
    Keymaster

    Since you’re using a custom query, you’re taking the query into your hands. So, you need to account for the fact that WordPress’s get_posts is going to grab 5 posts unless you specify otherwise.

    In your query string you’d add posts_per_page=-1 or numberposts=-1. A “-1” means to pull all posts. Otherwise, you can specify a certain number.

    #3609
    odyn
    Participant

    Worked like a charm. Thank you!

    #16783
    odyn
    Participant

    Hm, the same query now works on one page but not on the other.
    When I use the new post grid plugin, and write
    post_status=future&cat=5
    under custom query, I get
    [post_grid columns=”2″ rows=”20″ query=”post_status=future&cat=5″]
    as a shortcode in the text editor.
    Neither
    [post_grid columns=”2″ rows=”20″ query=”post_status=future&cat=5″]
    nor
    [post_grid columns=”2″ rows=”20″ query=”post_status=future&cat=5″]
    seem to work. Only the first argument is registred, but the second (following the &) not.

    Using Slovenian wordpress 3.9, plugins and theme updated to the latest version, also have Show Future Posts on Single Post activated.
    Any idea?

    #16798
    Jason Bobich
    Keymaster

    In your query, instead of using & try using &.

    [post_grid columns="2" rows="20" query="post_status=future&cat=5"]
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.