Okay
  Public Ticket #1423245
Portfolio items display and random
Closed

Comments

  • samzucker started the conversation

    Hello, I have several issues with my portfolio:

    1) The randomise option, which works previously, is not working. My portfolio items display in the same order ever time I load the "PORTFOLIO" page.

    2) I would like to be able to disable hover on portfolio on mobile. 

    3) I would like to allow 2 columns for my mobile portfolio, while keeping 3 columns on desktop. 

    4) I would like to control the order in which the portfolio categories appear (Drinks, Food, etc). 

    5) I would like the option to have the default portfolio view be one of the categories, instead of loading "All" items. 

    Can you please offer some help? Thanks!

  •  507
    Art replied

    Hi samzucker,

    Can you please share your site credentials here, because we need to login to your site and see this issue live. Your information is safe (private) in this thread.

    To include your credentials click Insert Credentials button in editor toolbar. (See how)

    Kind regards,
    Art


      Documentation        Follow on Envato         Like on Facebook

  •   samzucker replied privately
  •  352
    Arlind replied

    Hi samzucker,

    1. Since you are using WP Super Cache and if its on, it will cache entire page so I have added it to excluded list of cached pages:


    (view large version)

    Currently WP Super Cache is turned off on your site however I have tested and it worked.

    2. You can disable portfolio hover with CSS on 768px screen size and below:

    @media screen and (max-width: 768px) {
    .portfolio-holder .item-box.wow.animated .thumb .hover-state {
    display: none;
    }
    }

    3. This CSS will set two columns per row on mobile screensize:

    @media screen and (max-width: 768px) {

    .portfolio-holder .portfolio-item.w4 {
    width: 50%;
    }
    }

    4. This plugin adds the ability to manage the order of category/other taxonomies order:

    https://wordpress.org/plugins/taxonomy-terms-order/

    5. This option is not implemented yet in our theme however if you add a URL that has the hash of category slug then it will automatically select that category, for example:

    http://dev.zuckerandspice.com/portfolios/#drinks

    If you click here, the Drinks will be shown on that page by default.

    I hope this helps you.

    Kind regards,
    Arlind


      Documentation        Follow on Envato         Like on Facebook

  • samzucker replied

    Thank you for the detailed reply Arlind!

    Unfortunately, the PORTFOLIO page has gone back to not displaying the random order I selected, and also shows a portfolio item category that I do not want to have visible. Any ideas?

    Thank you!

  •  352
    Arlind replied

    Hi samzucker,

    I have made a video while I turned the cache ON and then tried to refresh Portfolio page, as you can see it is working:

    https://d.pr/v/pRmOde

    I hope this is the correct way to work on your site, otherwise I am not sure what I can do here!

    Kind regards,
    Arlind


      Documentation        Follow on Envato         Like on Facebook

  •   samzucker replied privately
  •  352
    Arlind replied

    Hi Samzucker,

    I have was trying to debug the issue with random portfolio order, I was able to login to your WordPress however after few tries I got this error:


    (view large version)

    Can you please let me know how can I access your site without having to see this error.

    Kind regards,
    Arlind


      Documentation        Follow on Envato         Like on Facebook

  • samzucker replied

    Hi Arlind! That's strange. Everything seems to be fine with the hosting at the moment.Can you access it now? 

    Thanks! 

  •  352
    Arlind replied

    Hi samzucker.

    I have disabled/enabled and cleared the cache of WP Super Cache and portfolio items were showing the same order, so its not related to "WP Super Cache", I have added a debug code to see if the page is cached and it results that a cached page is served, to understand this its easy:

    Added this code in functions:

    // Debug random number
    add_action( 'kalium_portfolio_query', function( $query ) {
    if ( kalium()->get( 'hello', true ) ) {
    echo 'Random: ' . mt_rand( 1, 99999 );
    }
    return $query;
    } );

    So when accessing portfolio page with ?hello={something} it will show the random number:

    http://dev.zuckerandspice.com/portfolio/?hello=123

    The random number should be shown different in each refresh (request). But once you click the URL lets say hello=123 the random number is shown "75638", if you refresh the page that number is still shown "75638" meaning that the page is served from cache not executed again. This is why the portfolio items order are not showing in random order because the page is being served as cached. 

    You can replicate this issue also by adding something else in URL, lets say ?hi=hola:


    (view large version)

    And if you change that "hola" to "halo" the page will output random order of portfolio items:


    (view large version)

    You must discuss this issue with your hosting provider because this is not related to our theme.

    Kind regards,
    Arlind


      Documentation        Follow on Envato         Like on Facebook