• Resolved c0a8fd

    (@d7a7e8)


    Hello.
    I have the same issue as described in this topic, but the provided solution doesn’t help me.

    “I saw that if i resize the browser window after the page has loaded (with the messed up layout) the thumbnails become justified. So only the first render of the gallery is not justified, if i resize the browser window it gets justified.”

    I mean adding

    <script type='text/javascript'>
    jQuery(window).load(function() {
    	photonicJustifiedGridLayout(true);
    });
    </script>

    to my theme’s footer.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    You have some JS errors, which are preventing this from executing:

    1. You have a file called preloader.js, which has a syntax error
    2. Your jQuery script doesn’t seem to be the standard one that WP bundles; it seems to be something included by a plugin called “jQuery Manager”, and that is throwing another error triggered by the lines you included for Photonic.

    My guess is that if you address these errors you should be fine.

    Thread Starter c0a8fd

    (@d7a7e8)

    @sayontan Thank you for the response.

    I’ve deleted the files with errors and uninstalled the plugin (it was a try to figure out if the issue is connected with the jQuery and scripts or is something wrong with css).
    But I still have the problem and have no idea what’s wrong.

    Plugin Author Sayontan Sinha

    (@sayontan)

    How are you doing your page layout animation? If you are doing it via JavaScript, do you have any way to disable it just for this page?

    Thread Starter c0a8fd

    (@d7a7e8)

    @sayontan
    It’s done with css.

    Plugin Author Sayontan Sinha

    (@sayontan)

    That might be the cause of the problem. The code I provided in the thread that you linked pertains to pages where the loads and transitions happen using AJAX or JavaScript. I am not sure of the sequence of events on your page. If the CSS transition is happening after the JS calls, then the layout will not get corrected. One thing to try is to see if disabling animations for this page resolves the issue.

    Thread Starter c0a8fd

    (@d7a7e8)

    @sayontan Thank you a lot. I think I’ve “saved” the animation from total disabling and the galleries are loading properly at the same time. ??
    I’ve set “animation-duration: 0s;” for these pages using body classes.
    Just one more (maybe stupid) question: if there’s any ability to get these images indexed for search engines?

    Plugin Author Sayontan Sinha

    (@sayontan)

    The gallery HTML is actually generated by PHP (not JavaScript), so the results will be indexed by search engines. However, there is a catch for Google Photos (and only for Google Photos). Basically the URL returned by Google is a “short-lived” URL, so it expires after around 30 minutes. So, even if indexed, the markup is going to get invalid after 30 minutes. This is one of the reasons why caching works for everything apart from Google Photos.

    There is no workaround as far as I am aware.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Random justified gallery is not justified’ is closed to new replies.