• Hi there, I have added the code to functions.php, but seem like not working, can you help?

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

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

    (@malihu)

    Hello,

    Sorry for the late reply but I was away for the Easter.

    I checked your page and the code does work. The issue is the way you added the id targets, as they’re not enclosing the sections.

    Try adding the targets like it’s described here:
    https://manos.malihu.gr/page-scroll-to-id-for-wordpress-tutorial/#targets-section-gutenberg
    under “Create id targets using the HTML Anchor field”.

    Basically you should use the HTML Anchor field or the id attribute of the block element to create the targets in the post/page editor.

    Does this help?

    Thread Starter yjk2020

    (@yjk2020)

    Hello,

    No worries, I have added it, now i know how it works. Thanks.

    • This reply was modified 1 year, 11 months ago by yjk2020.
    Plugin Author malihu

    (@malihu)

    You need to add the HTML anchor/id attribute on the whole section which encloses the whole content you want the section to have.
    For example, you should have a group block that contains the content and give the HTML anchor/id attribute to it, like this:

    • Group block with the anchor/id, e.g. section-1
      • some heading
      • some paragraph
      • some image
      • etc.
    • Group block with the anchor/id, e.g. section-2
      • some heading
      • some paragraph
      • some image
      • etc.
    • Group block with the anchor/id, e.g. section-3
      • some heading
      • some paragraph
      • some image
      • etc.

    Let me know

    Plugin Author malihu

    (@malihu)

    I’m gonna post the example again as the list does not show correctly:

    Group block with the anchor/id, e.g. section-1
    — some heading
    — some paragraph
    — some image
    — etc.
    Group block with the anchor/id, e.g. section-2
    — some heading
    — some paragraph
    — some image
    — etc.
    Group block with the anchor/id, e.g. section-3
    — some heading
    — some paragraph
    — some image
    — etc.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Page scroll to id with Mousewheel Not working’ is closed to new replies.