Viewing 14 replies - 1 through 14 (of 14 total)
  • Just delete the https:// text that already in the URL section and replace it with a Div Id.

    So for mine to scroll down to the footer widgets i just put #footer-widgets

    Also make sure that you add m_PageScroll2id into the Link Relationship (XFN) area below. If you can’t see it make sure it’s visbale by turning it on in Screen Options up the top of the page.

    Plugin Author malihu

    (@malihu)

    Hello,

    The plugin works with relative (#id) and absolute URL (https://…#id).

    Please check plugin’s FAQ, especially “When I click the link, nothing happens…” and “Can I use the plugin to scroll an overflowed div?”.

    Thread Starter KiwiLondon

    (@kiwilondon)

    Dear Drog, dear Malihu,

    thank you for your answers!

    I added links into the pages, added m_PageScroll2id into the XFN field and div id’s, however, it still does not work. Somehow I think it is because I try to connect several pages. It is not a single-page website. Might this be the reason why it’s not working?

    thanks,
    best
    kiwi

    Plugin Author malihu

    (@malihu)

    I can’t really say. If you can send me your link I could see what’s going on and provide more help.

    Thread Starter KiwiLondon

    (@kiwilondon)

    Dear Malihu,

    thanks for getting back! This is the link: multilingualsynergies .com cheers,kiwilondon

    Plugin Author malihu

    (@malihu)

    It seems that you’re having each section on a different page/URL and not on a single page. That’s why the plugin doesn’t do anything.

    The thing is, even if you added an extra script in your document to make the plugin animate each separate page to its section, it wouldn’t make any difference. Your sections are at the top of each page, so the plugin wouldn’t have to scroll anywhere (as it’s already there).

    I’d suggest creating a single-page website, meaning putting all or most of your sections on one page. Using the plugin in such layout would make more sense.

    If you still want to use a different URL for each section and have the plugin animate the page on page load, you can use the following script which you’ll have to add it in your theme (e.g. in footer.php) manually:

    <script>
        (function($){
            if(location.hash){
                $(window).scrollTop(0); //stop jump to hash straight away
                setTimeout(function(){
                    //stop jump to hash again a bit later
                    //for browser compatibility
                    $(window).scrollTop(0);
                },1);
            }
            $(window).load(function(){
                if(location.hash){
                    setTimeout(function(){
                        //use page scroll to id scrollTo method
                        //to animate page to location hash
                        $.mPageScroll2id("scrollTo",location.hash);
                    },1);
                }
            });
        })(jQuery);
    </script>

    Hi thanks for looking.

    I only have one page. the links at the top are trying to link to DIV ids on the same page.

    Everything is on the same URL and page.

    Thanks.

    Plugin Author malihu

    (@malihu)

    The only link that points to the same URL is “Home” (https://multilingualsynergies.com/#top), that’s why it’s the only one that works (if you scroll down and click “Home” it’ll animate the page to the top).

    All others are on different pages. For example “Work & Education” points to https://multilingualsynergies.com/work-edu/#site4 (not https://multilingualsynergies.com) and in that URL (https://multilingualsynergies.com/work-edu/#site4) there’s no div with id="site4".

    Thread Starter KiwiLondon

    (@kiwilondon)

    Amazing answer, thanks for that Malihu! I shall put everything into one page then, and see if it works. I will get back and let you know. Thanks for your help! Best, Kiwi

    Plugin Author malihu

    (@malihu)

    Glad I helped ??

    Thread Starter KiwiLondon

    (@kiwilondon)

    perfect, works now after putting everything on one page. cheers!

    Hello there,

    I’m new here and trying to figure out how this plugin works before installing.

    – Finally, is it possible to have different pages or not?
    – Is it better to have all elements in a single page?
    – In that case, how are the menus build up? Using the anchors?

    Thanks!

    Plugin Author malihu

    (@malihu)

    – The plugin works on different pages when ‘Scroll to location hash’ in plugin settings is enabled.

    – ‘Page scroll to id’ replaces the default browser behaviour of “jumping” to page sections when links with href value containing # are clicked, by smoothly animating the page to those sections. Normally this happens in a single page. If all your sections are on different pages, using the plugin doesn’t make much sense.

    – Your menu links output should be like:
    <a href='yoursite.com/page/#id' rel='m_PageScroll2id'>link text</a>
    For more info read plugin description and FAQ.

    Thanks a lot for this, will check this out further.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘change URL into #id’ is closed to new replies.