-
kingtutuParticipant
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.
Daniel TaraKeymasterYou 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.
kingtutuParticipantHi 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!
Daniel TaraKeymasterYou are using the template “Sidebar / Content”, try using the template “Blog, Left Sidebar”.
kingtutuParticipantAhh – 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! π
kingtutuParticipantBah 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.
Daniel TaraKeymasterThat’s true only for the index.php template, for custom templates that should not be the issue.
Tagged: slider slow load times
You must be logged in to reply to this topic.