• Resolved johnbrid

    (@johnbrid)


    Hi
    I have a sticky header and needed an offset. Page scroll to id seemed ideal. However it did not work at all to start with. Having read some of its issues I realised the theme was overriding it. I discovered a smooth scroll setting in the global customisation of the theme and switched it off. It then started to work but only when the anchor was on a different page to the link text.
    You can force it to work by changing the anchor from just #my_id to the full address as if it was on a different page. Unfortunately there is then the delay while the page is reloaded so not really smooth at all.
    My best solution was to leave the customizr theme smooth scroll switch off. Use the page scroll to id target block in gutenberg and place it about 150 pixels above where i want the target to be. In other words put the anchor the offset distance above where I really want the anchor. Not ideal but it works for me.
    Is there a better solution?

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author malihu

    (@malihu)

    Hello,

    I just checked your site as well as your other post here.

    It seems that you can solve the issue with the theme’s internal smooth scrolling functionality by changing your links to use the full URL (not just the target id hash), without page reloading.

    For example, on this page, change your “have most facilities” link URL from:

    #facilities

    to:

    /best-yorkshire-coast-resort/#facilities

    or

    https://yorkshirecoastholidaycottages.co.uk/best-yorkshire-coast-resort/#facilities

    This way, there’s no page reloading or any delay.

    I’m not sure why you saw a page reload when you changed the links to full URL but maybe you used http instead of https or didn’t include the trailing slash(?) in the URL?

    In any case, your server redirects all requests without the trailing slash, e.g.:

    it redirects:

    https://yorkshirecoastholidaycottages.co.uk/best-yorkshire-coast-resort#facilities

    to:

    https://yorkshirecoastholidaycottages.co.uk/best-yorkshire-coast-resort/#facilities

    It also redirects all requests with www, e.g.:

    it redirects:

    https://www.yorkshirecoastholidaycottages.co.uk/best-yorkshire-coast-resort/#facilities

    to:

    https://yorkshirecoastholidaycottages.co.uk/best-yorkshire-coast-resort/#facilities

    And also redirects non SSL requests (http), e.g.:

    it redirects:

    https://yorkshirecoastholidaycottages.co.uk/best-yorkshire-coast-resort/#facilities

    to:

    https://yorkshirecoastholidaycottages.co.uk/best-yorkshire-coast-resort/#facilities

    So you simply need to make sure your links URL include the trailing slash (before the target id hash), do not include the www subdomain and also have https.

    You can basically skip the https and www checks by setting you URLs to:

    /best-yorkshire-coast-resort/#facilities
    /best-yorkshire-coast-resort/#photo

    etc.

    Hope this makes sense ??

    Let me know if it worked

    Thread Starter johnbrid

    (@johnbrid)

    Thanks Malihu
    Yes it makes perfect sense. Unfortunately it works the same as just the anchor #my_id. In other words it does not use the offset and scroll time set in your plug in. It is responding to some inbuilt scroll routine even though I have switched off smooth scroll. To make the scroll respond to your plug in it seems that the page has to be reloaded by putting the full page reference in. Or of course put the link on one page and the anchor on another then it works fine.
    So sorry no it has not solved the problem.
    Could it be to with timing of which scroll routine gets put in first.
    Yes i have got a lot of redirects in as I had an old html site, done some renaming and I have just got an ssl certificate as well.
    Thanks
    John

    Plugin Author malihu

    (@malihu)

    No problem ??

    I just checked your page (https://yorkshirecoastholidaycottages.co.uk/best-yorkshire-coast-resort/) and I see that the links URL have not changed (i.e they still have only the target id hash and not the full URL).

    Did you changed them or? Maybe you need to clear your site cache in order to apply the changes?

    • This reply was modified 5 years, 1 month ago by malihu.
    Thread Starter johnbrid

    (@johnbrid)

    Hi Malihu
    Yes I changed them and then changed it back after I observed what it did. I did not clear the cache. I will try that now but not hopefull as things did change as I said.

    Plugin Author malihu

    (@malihu)

    Leave them changed so I can see what happens. Your (now changed) “have most facilities” link is working now using plugin’s functionality (not the theme’s one)

    Plugin Author malihu

    (@malihu)

    The “have most facilities” link is working correctly. The page is scrolling smoothly using the plugin’s settings (duration, easing etc.) as well as plugin’s offset which you’ve set to 250 pixels.

    When I click the “have most facilities” link, the page scrolls correctly 250 pixels before your facilities target which is right below the “Fourth – Bridlington” title.

    Is this what you see?

    Thread Starter johnbrid

    (@johnbrid)

    Yes. It is all working now and it is your plug in doing all the settings. It must have been the cache. I should know by now. I have been caught out before by making a change and not clearing the cache and so not seeing it working.
    Thanks very much. It is ideal now.
    John

    Plugin Author malihu

    (@malihu)

    You’re welcome ??

    Not clearing the cache is a common issue and used to happen to me all the time ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Problems with the Customizr theme’ is closed to new replies.