Support » Plugin: Posts in Page » [Plugin: Posts in Page] How to order also by date the posts I'm showing by category?

  • Resolved sergiofrumento


    Hi users, I have a question.
    I used this comfortable plugin to make different pages on the same domain, and so I put the code [ic_add_posts category=’category-slug’] on a page that I wanted to show only the posts of a certain category.

    It worked great, but I need one more function: the posts have to be shown beginning by the older ones (normally WordPress order posts beginning with the last ones).

    I saw that in other code examples there is a function that remind me to this feature: [ic_add_posts orderby=’title’ order=’ASC’]

    Unfortunately, adding to the code [ic_add_posts category=’category-slug’] order=’ASC’ or order=’DES’ or order=’DESC’ had no effects.

    It’s possible to order the posts of a category by date?

    Thank you for the answers 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Eric Amundson


    Hi sergiofrumento,

    It should work using the shortcode. I’ll check a few things and get back to you shortly.


    Plugin Author Eric Amundson


    Hi sergiofumento,

    Looks like you need to set the orderby as well. We’ll update this in a future version, but right now, you’ll want to try something like this:

    [ic_add_posts category='category-slug' orderby='date' order='DESC']

    I hope that helps.


    It works! Thank you very much Eric, I promise to you a donation if I will ever earn something from my site. 😀

    Just to help other users, the code that Eric suggested to me mantain the usual order of WordPress’s posts (the new ones as firsts), to invert it you have to write ‘ASC’ instead of ‘DESC’.

    Thank you again for the plugin and for your help!

    Plugin Author Eric Amundson


    You’re quite welcome!

    You’re right, if you want to invert the order from what I listed above, you’ll use:

    [ic_add_posts category='category-slug' orderby='date' order='ASC']

    Have a great day!


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Posts in Page] How to order also by date the posts I'm showing by category?’ is closed to new replies.