This topic has 11 replies, 5 voices, and was last updated 7 years by Radu.

  • Author
  • #108010
     chrisatnetworld
    Participant

    The “Related Posts” portion at the bottom of a blog article page is always showing the very first 3 articles. I would like to change it to show the 3 most recent or order it randomly so that it shows different related posts each time. How/where can I change this? Do I have to alter the PHP template or is there a setting in the admin somewhere I am missing?

     

    Example:

    Article page: http://icxa.org/2016/03/billy-bishop-toronto-city-airport-creative-competition-st-joseph-thrilled-to-be-a-top-5-finalist/

    At the bottom it shows “ComQi wins…” then “ICX Association Honors” and “Scala announces” which are the first three posts in the “Industry News” category. It shows these three at the bottom of every article in this category. I want it to ORDER BY post date DESC or RANDOM

    #108197
     Laura
    Moderator

    Hello, it shows related posts and right now can’t be changed
    If you want to change it you may need to change theme functions, we can only help you with small modifications

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #108218
     Laura
    Moderator

    Hello, you can check it out at the file kleo\page-parts\posts-related.php
    And you will see its sort by random

    COPY CODE
    
    /* Query args */
    $args=array(
        'post__not_in' => array($post->ID),
        'showposts'=> 8,
        'orderby' => 'rand' //random posts
    );
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #108262
     chrisatnetworld
    Participant

    Thanks for the reply Laura. But according to that code it should show (or orderyby) random posts, which would work fine for me, but it doesn’t. It always shows the oldest 3 posts. So that seems like a bug.

    #108552
     Laura
    Moderator

    Hello, could you share admin credentials so i can check it out? 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #112743
     chrisatnetworld
    Participant
    This reply has been set as private.
    #113047
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #113685
     Radu
    Moderator

    Hi,

    I see that you have an old kleo version (3.0.8) the theme current version is 4.0.4 i suggest you to update the theme then test again.

    Let me know

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #114160
     dribgib
    Participant

    Newest version of Kleo – this bug still exists.

    I see this code:

    $args=array(
    ‘post__not_in’ => array($post->ID),
    ‘showposts’=> 8,
    ‘orderby’ => ‘rand’ //random posts
    );

    But it doesn’t actually work ;o

    #114433
     Radu
    Moderator

    Hi,

    I understand,

    I will add this to buglist untill we patch this pluase replace the code form above with this

    COPY CODE
    /* Query args */
    $args=array(
        'post__not_in' => array($post->ID),
        'showposts'=> 8,
        'orderby' => 'rand', //random posts
        'order'   => 'ASC' //most recent first
    );

    Also let me know if that works ok.

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #170532
     Imzaia World
    Participant

    Hello there,

    I still have this problem as well.

    Has any fix been found in the meantime?

    Thank you.

    Regards,
    Yin

    #170724
     Radu
    Moderator

    Hi,

    Just replace this file content : /kleo/wp-content/themes/kleo/page-parts/posts-related.php

    With this one: https://pastebin.com/raw/KwvbBDjp

    This will be fixed in next theme update so just replace that file content.

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 12 posts - 1 through 12 (of 12 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?