• cweberDC

    (@cweberdc)


    Hello,

    I am trying to solve the issue of why my most recent posts aren’t being displayed. For example let’s say I’m on a posts page

    “Title A” let’s say created on 4/5/2015.

    If I go to that posts page in the related box it skips the first 1 or 2 newest posts I have created in that category. So if I made some posts with these dates

    “Title B” created on 7/7/2015
    “Title C” created on 5/25/2015

    In the related box either both of these or sometimes one of these doesn’t display. In the settings I have it checked off to display newest to oldest but it is not pulling in the most recent posts I have created.

    https://www.ads-software.com/plugins/yet-another-related-posts-plugin/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter cweberDC

    (@cweberdc)

    To add to this I enabled the option “Show only posts from the past” and set it to 12 months and it pulled in the newest ones but also pulled in posts from other categories.

    I would like the current category to be the priority but also pull in the newest posts that have just been created for that category

    Thread Starter cweberDC

    (@cweberdc)

    I sent an email explaining my fix for this as well posting this here:

    what I did is in your function protected function sql() down where you have
    “order by score”
    I changed it to

    ” order by score, post_date desc limit $limit”
    I noticed that you perform the sql and just order by score which doesn’t order by date as well. So with a lower limit like 8 some of the newest posts may not be in that query that is returned. with sorting by date as well it returns the most current posts.

    This was my understanding of order by (new to old).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Not showing newest posts’ is closed to new replies.