'Splash' page with most recent posts from seperate categories (2 posts)

  1. sean_m_flannery
    Posted 9 years ago #

    I need to create a 'splash' page that shows the two most recent post from three seperate categories. I was able to implement that easily enough with get_posts(), but that code now populates the index page via all posts. What I want, instead, is for that custom get_posts() code to execute when a user requests my index file, but, when they submit, say, a 'search' or 'archive' request, I'd like the normal have_posts() code to be executed.
    How do I accomplish that need? Is there a way to just over-ride have_posts() or some thing, where I can specify 'if the user hasn't submited a specific content request', respond with this custom data, else response normally? Thanks. Any help would be appreciated.

  2. Joshua Sigar
    Posted 9 years ago #

    Add to your theme, search.php and archive.php with the normal loop.

Topic Closed

This topic has been closed to new replies.

About this Topic