Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #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?

    http://christinamrozik.com/

    #115907

    Hi,

    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

    remove_all_filters('posts_orderby');

    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 http://wordpress.org/extend/plugins/search.php?q=related

    Thanks,

    Niick

    #115908

    BTW, this works great!

    #115909

    Hey,

    Glad it worked. :)

    Regards,

    Ismael

    #115910

    Hi,

    One more thing. Please compress your images. For example – this image http://christinamrozik.com/wp-content/uploads/2013/01/600×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

    ( http://tinypng.org/ ) 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 http://pnggauntlet.com/ , which will optimize all images in a folder.

    Thanks,

    Nick

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

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