The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

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

  1. rwilki
    Posted 2 years 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:

    Any help is very much appreciated!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.