WordPress.org

Support

Support » Plugins and Hacks » limit number of post archives in specific category on home page

limit number of post archives in specific category on home page

  • I’ve been searching for many hours for this solution and can’t figure out an answer.

    On my home page, I have a section displaying recent posts where it shows permalink titles, and excerpts. It’s showing all of the published posts in this specific category but I need to limit the number of posts to 3.

    I can’t set this in my “Reading” settings because I don’t want “3” to be a global setting, only for recent posts on my home page.

    This is my current code. I’ve tried everything but nothing is working.
    My index file points to a loop-index.php file so that’s where I’ve been editing code although I’ve tried changing code in the index.php file as well as the loop-index.php and the functions.php file

    Here’s a link to the code:
    https://gist.github.com/rwilki/3ab9192955891f43ac01

    Any help is very much appreciated!

  • The topic ‘limit number of post archives in specific category on home page’ is closed to new replies.