• I built a site using the “Minimalist” theme — it uses mootools for scripting but I’m not much of a coder – just enough to patch together a page. When I load the home page, you can see all the content expanded out for a split second, and then it compresses to its “real” look and feel. I can’t figure out for the life of me why it won’t just load in its final form — I’ve disabled all plugins, etc. Any thoughts?

    site: https://www.mattgaventa.com

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • A H

    (@arlo-haskell)

    I’ve fought this problem too. It looks like your site is working fine now. What did you do?

    I experimented with a few caching plugins, and have had limited success with W3 Total Cache. I say ‘limited,’ b/c it seems to have eliminated the ‘jumping’ problem in Firefox (after your first visit), but not in Chrome. Check it here: https://sandpaperpress.net/

    I have another, maybe related problem with this theme. Which is that it is VERY SLOW to load. It was slow with all the caching plugins I tried, and without any caching. Did you run into this problem, too, and if so, how did you fix it?

    Thanks.

    A

    Thread Starter iamjackshandle

    (@iamjackshandle)

    I figured it out by piecing together a few solutions from other uses of this theme. Basically, a quick three-step solution (which assumes you have kept basic style names intact and not made earthshaking modifications to the CSS configuration).

    1). These lines in your main CSS file:

    .content{display:none;}
    .menucontent{display:none;}

    This ensures that the accordion content never displays on pageload.

    2). The problem now is to “overcome” the style attribute in the mootools script. The script as written fails to do this. Here’s a modified version to compensate:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    3. This creates a problem with the .contentheader style as the theme uses it in archive.php and search.php (because the “Search Results” header is in the same style as the post name, and thus tries to hide its subordinate content per the rules of the script). To fix this I had to duplicate the css entries for .contentheader as .contentheader2 and adjust the php accordingly.

    I hope this helps! I haven’t had any overdue slowness with the theme. When I was troubleshooting the pageload question, I routinely disabled all plugins and that never seemed to adjust load times one way or another. I use WP Super Cache without any strong difference in load time (for a site with admittedly very little data content to load in the first place).

    Thread Starter iamjackshandle

    (@iamjackshandle)

    Two clarifications:

    The .contentheader2 change is this: basically, use .contentheader2 for “Search Results” or the Archive Results headline so that it would not be controlled by the script, but duplicate the style attributes from styles.css (and white.css or whatever color script you have gone with) so that it appears seamless.

    Also: Much credit due to The Daily Transmission, the only site I found that had managed to solve this problem without rewriting the accordion in jquery. I heavily appropriated their solution and modified the code only slightly to serve my site needs.

    Thread Starter iamjackshandle

    (@iamjackshandle)

    Ack! Didn’t realize I had pasted too much code for forum rules. Here’s the script:

    https://pastebin.com/mdw6C4mU

    A H

    (@arlo-haskell)

    Thanks for posting back so quickly!

    I followed your first step, adding the following to the css:

    .content{display:none;}
    .menucontent{display:none;}

    As promised, the accordion content did not display. But also, the post title headings became static. They no longer linked to the post content; and did not appear with the a:link styling given in my css. There’s no navigation to the content at all.

    Do steps 2 and 3 resolve the above? I have made a lot of changes to my .css over time and I don’t want to dig in too much further (I’m no pro with .js files) here if I have some other underlying css stuff to tailor.

    Thanks again.

    Thread Starter iamjackshandle

    (@iamjackshandle)

    I’m hardly a pro. So take what I say with a certain grain of salt. That being said:

    When you say that “the post titles became static” etc… if by that you mean that the homepage looked just like it looked before, but was now no longer interactive (i.e. you can’t click on the titles and generate a drop-down, there’s no way to “enter” the content)… that’s okay. The script is designed to fix that.

    I would TRY the different script. I think you have the right element names such that it will work seamlessly. In your theme directory you’ll find /scripts/script.js — just make a backup of that file and then replace the active one with the script I linked to above. It’s worth a try.

    (btw, based on my quick reading of your site, because you’re not using the archives or search function and not using the accordion structure in any subpages, you can just skip step #3).

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Page jumping on site load’ is closed to new replies.