Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #22477

    In the related entries section on the bottom of the portfolio page it pulls the same four entries in every category. It keeps potential clients in this perpetual loop of the same four or five entries. Is there any way to diversify which items are chosen as a related entry? If I added more categories or tags would it choose a different group of related entries?



    For the Blog posts, relations are defined by tags: if post tags match, the post will be displayed as related. For portfolio items, it is based on categories.

    This is the query used on line 52 of related-posts.php

    $my_query = new WP_Query(array('portfolio_entries'=>$tag_ids, 'showposts'=>$postcount, 'ignore_sticky_posts'=>1, 'orderby'=>'rand', 'post__not_in' => array( $this_id ) ) );

    Please try adding this code to line 51


    and see if some different sequences start showing up. Adding more categories won’t do much since it selects them always in the same order, alphabetically probably.

    You can take a look at what’s available and what is done




    BTW, this works great!



    Glad it worked. :)





    One more thing. Please compress your images. For example – this image×698-450×525.png is 613K (an image of this type should not be png anyways but a jpg) but even if you keep it as a png and run it through a lossless compressor (which Photoshop doesn’t use) , it will come out 186K, a 70% reduction without any difference in the way it looks

    ( ) See for yourself. … When you add up all the images on the homepage, after optimizing the page will be a few megs smaller, a very significant reduction in load time (especially on mobile devices).

    You can also install this free app on your desktop , which will optimize all images in a folder.



Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Related Entries pulls same portfolio items’ is closed to new replies.