Post edited 7:14 am – November 6, 2009 by Joseph Cefoli Post edited 7:18 am – November 6, 2009 by Joseph Cefoli
If you are using the Gazette Edition theme and want to solve a page layout loading glitch on slow connections, read on.
What was happening was that the static images, titles and descriptions would load chronologically before the JavaScript and CSS style sheets loaded. The javascript/css then rearranged the layout to make the scroller work properly. For those of us on slow connections, we would see something like this until the page loaded:
On fast connections, this wasn't really a problem, but often times our internet at school is slow. Therefore, numerous people complained about the glitchy, overlapped page while the site was loading. This is not professional and I decided to investigate.
The solution is rather simple: add some CSS styling tags to the code and make a few elements hidden, so that nothing will overlap content that is already there. When the script loads, the images will become visible and the proper layout will display because the external style sheet takes priority.
Instructions:
In wp-content/themes/gazette/includes, open featured.php
Essentially, all we're doing is adding a style tag with visibility: hidden so that the overlapping content doesn't display while the page loads
Now, when our page is loading, it no longer makes a mess of our layout and we get a white placeholder, followed by the loading graphic until the real images load.
Just letting you all know that this is a very old code source you're looking at here. In the mean time this slider has been built from scratch, by myself, and now has allot more features and is allot more slow load friendly.
You can edit most of the slider settings, includings transitions and speeds, via the backend and not to mention all the other improvemnts and bug fixes.
Post edited 9:11 pm – November 8, 2009 by Joseph Cefoli
I like that. My code was kind of a workaround hack and although it fixes the layout problem – loading still isn't handled very well.
I notice that gallery is from Jondesign.net and he has since released a new version. We started using Gazette edition last June, so I'm glad it;s still being improved.
I will contact CoPress to get an updated version of this theme. I made a lot of customizations already, so I don't think I'll be able to completely replace it, as it will override my edits, but I can probably just mash it together so the new features are added.