Slider loading in background of blog pages

Viewing 8 posts - 1 through 8 (of 8 total)
  • #14601
    kingtutu
    Participant

    Hi,

    I purposefully chose to have the slider displayed on my home page (www.artistic-touch.co.uk), but hidden from my blog pages (www.artistic-touch.co.uk/interior-design-art-blog/).

    I originally did this using css (.blog #slider {display:none}) in my child theme style.css but I’ve come to realise the slider is still loading in the background, because I noticed slow load times on my blog pages. Sure enough, I checked it on thewebhostingher.com to look at the GET requests and the slider images are slowing down load times, even they’re not being displayed.

    Do I have to create a modified index.php to stop the slider being loaded on my blog page? I couldn’t work out what changes to make because I though the slider is only meant to load if the page is_home()?

    Many thanks and great theme.

    #14602
    Daniel Tara
    Keymaster

    You can create an empty page and assign one of the “Blog” templates to it, as done here and use that as a link for your blog.

    #14603
    kingtutu
    Participant

    Hi Dan, thanks for quick response.

    I actually did that in the first place – I assigned “Blog, Left Sidebar” to it, yet I’m still getting the slider images loading in the background as seen here.

    Reason I’m keen to remove the loading of slider images in the background is because if you start browsing to later pages in my blog, some of the images stop loading (page 3 onwards), particularly in Internet Explorer. I even have a CDN enabled…(I will also compressed the png too) but really keen to stop un-needed images being loaded!

    Thanks!

    #14611
    Daniel Tara
    Keymaster

    You are using the template “Sidebar / Content”, try using the template “Blog, Left Sidebar”.

    #14620
    kingtutu
    Participant

    Ahh – so I had chosen Blog, Left Sidebar as the template from the start, but it seems the “Reading Settings>Posts Page” setting overwrote that template to “Sidebar/Content” setting. I was trying to hide the sticky slides from being posted at the top, so I will modify the Sidebar/Content page in my child theme now instead. Thanks for pointing out the template was not what I was expecting! πŸ™‚

    #14622
    kingtutu
    Participant

    Bah ok so just realised the slider is being included as part of page.php logic:

    if(is_front_page())

    Whilst this is fine for the front page, the slider still exists in my blog page (even though this *should* return false for Static Front Page>Posts Page>My Blog page according to the reference documentation).

    Am I missing something? Thanks.

    #14629
    Daniel Tara
    Keymaster

    That’s true only for the index.php template, for custom templates that should not be the issue.

    #15001
    kingtutu
    Participant

    Great – thanks Daniel. You’re right, I modified index.php in my child theme and that worked a treat for me.

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

You must be logged in to reply to this topic.