WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Random post list within the single page loop (6 posts)

  1. adorecarol
    Member
    Posted 2 years ago #

    What I want to accomplish in my single page template is this:

    Content
    Random Posts List
    Navigation
    Comments

    I tried to nest a loop for the Random posts list within the main loop and I thought it worked, but it affected the navigation and comments section as well. The previous and next links showed posts in random order and that's not what I wanted.

    How do I go about embedding a random posts list and still keep the navigation and comments from the original loop?

  2. adorecarol
    Member
    Posted 2 years ago #

  3. Digital Raindrops
    Member
    Posted 2 years ago #

    Hi Carol,
    You will need to create a page of posts, using page.php as a template page and adding in a random posts loop.

    This page on my website has the same structure as you are looking for.

    The code will be theme specific and without the structure would be hard to advise, if the theme a free downloadable theme post a link?

    At least post the contents of these two files to http://pastebin.com and post the links!

    index.php
    page.php

    HTH

    David

  4. Digital Raindrops
    Member
    Posted 2 years ago #

    Ok I read it again, are you just talking about a lists of posts at the end of single.php?

    Have a look at the Y.A.R.P. Plugin "Yet Another Related Posts" plugin, this may work out the box

    HTH

    David

  5. adorecarol
    Member
    Posted 2 years ago #

    Thank you for showing me this plugin, but I was hoping to find one for random posts, not related. :]

    Do you know of any?

  6. adorecarol
    Member
    Posted 2 years ago #

    I got it working with the Ajax Random Posts Plugin. :]
    Thanks for your help.

Topic Closed

This topic has been closed to new replies.

About this Topic