WordPress.org

Ready to get started?Download WordPress

Forums

limit number of post archives in specific category on home page (1 post)

  1. rwilki
    Member
    Posted 6 months ago #

    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!

Reply

You must log in to post.

About this Topic

Tags

No tags yet.