Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #23384

    Hi Guys,

    We’re having trouble with Portfolio pagination on the home page which is now limited to 16 items, but since our home page scroll is too long and the portfolio is displayed at the very bottom of the page using the portfolio pagination will not be a good solution as the page will have reload all over again and users will have to scroll all the way down to see the new items, so this is not a good solution.

    However, since we have hundreds of items in the portfolio I recently found out that while we’re using the portfolio categories for filtering the Isotop will show only the last posts/items that been added to a specific category and all the rest are empty.

    So I will like to know if there is a way for us to change this behavior and make the Isotop load RANDOM items from each portfolio category, in our case 16 random items from each portfolio category.

    Thanks,

    -A

    #119640

    Actually the problem is that isotope just displays the items on the current page. If you activated the pagination isotope will just filter the items on the current page (16 items) and it won’t load “new items”. You can change the portfolio wordpress query order parameter to “random” – then wp will display the portfolio items in a random order. However this solution has two drawbacks:

    1) You can’t control which categories will be displayed on the page (eg wp can display 3 items of category A, 3 items of category B and 3 items of category C. But because of the random order it can happen that it just displays 6 items of category A and 6 items of category B).

    2) The pagination function doesn’t “remember” the items – thus it can happen that the user sees the same entries over and over again on page 1, page 2, etc.

    If you want to add the rand parameter open up includes/loop-portfolio.php and replace:

    if(isset($avia_config['new_query'])) { query_posts($avia_config['new_query']); }

    with:

    if(isset($avia_config['new_query'])) {
    $avia_config['new_query']['order'] = "rand";
    query_posts($avia_config['new_query']);
    }

    #119641

    Hi Dude,

    Thanks for that, appreciated. I will try that.

    However we’re NOT using pagination because it’s not even working when I’m enabling it, and I’m not even interested to enable it because the long scroll.

    So now the portfolio is only set to show 16 items (no pagination) – but still it shows only the last items that have been added only to those categories that the items have been populated in.

    I think we need a query to tell wp or isotop to always show 16 items from each sorting category, either by random or last – but from each sorting category as for sure the items exist in the database.

    I know it sounds very simple and logic to me and others but really can’t understand why it’s should be so complex to achieve that, as this what one would expect from the sorting feature.

    I’ll test the random code you provided in the meantime…

    Many Thanks,

    -A

    #119642

    Hi A,

    Its one of those things that has been asked quite a few times but what it comes down to is performance. Each time you call something from the database it has to query that data. So if it were to pull items that aren’t in the currently shown data; new query entirely.

    If a user were to quickly click on categories it would be like quickly hitting search in rapid succession and would feel unresponsive. Buddypress currently does this via ajax on their member list and it feels sluggish on most servers.

    As for the category display, if you want to show a specific amount from each category then I would suggest creating a new template builder template. Then have a portfolio element with a single category selected multiple times on the new template.

    You lost out on the sort, but you get 16 of each item. At its core, this is just how wordpress works. You query the data which defaults to date. Since you have a group of categories in a single query it just grabs X number of items from Y categories and then displays them.

    Regards,

    Devin

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

The topic ‘Change The Behavior of ISOTOP / Portfolio Filtering’ is closed to new replies.