• Hi,

    First of all thanks for this awesome addon. Works perfectly usually; this is the first time I’m facing an issue.

    I don’t have the site live yet, but it uses the Shapely theme: https://colorlib.com/shapely/

    I used to use it by just enabling “Enable on WordPress Menu Links” and having #id as the link in the Menu’s custom link items. This isn’t working on Shapely. I tried adding rel=”m_PageScroll2id” but that doesn’t work either.

    My menu code is:

    <li id="menu-item-8" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8"><a title="About Us" rel="m_PageScroll2id" href="#shapely_home_parallax-3" data-ps2id-api="true">About Us</a></li>
    <li id="menu-item-9" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-9"><a title="Contact" rel="m_PageScroll2id" href="#shapely_home_parallax-4" data-ps2id-api="true">Contact</a></li>

    The relevant page code is:

    <div class="col-md-12">
    
        <div id="shapely_home_parallax-3" class="shapely_home_parallax">
            <section class="">
                <div class="container">
                    <div class="row align-children">
    
                        <div class="col-md-4 col-md-offset-1 col-sm-5 col-sm-offset-1">
                            <div class="">
                                <h3>About Us</h3>
                                <p class="mb32">Content goes here.</p>
                            </div>
                        </div>
                        <!--end of row-->
                    </div>
                </div>
            </section>
        </div>
    
        <div id="shapely_home_parallax-4" class="shapely_home_parallax">
            <section class="">
                <div class="container">
                    <div class="row align-children">
                        <div class="col-md-4 col-md-offset-1 col-sm-5 col-sm-offset-1">
                            <div class="">
                                <h3>Contact Us</h3>
                                <p class="mb32"></p>
                            </div>
                        </div>
                        <!--end of row-->
                    </div>
                </div>
            </section>
    
        </div>
    </div>

    Thanks!

    https://ww.wp.xz.cn/plugins/page-scroll-to-id/

Viewing 1 replies (of 1 total)
  • Plugin Author malihu

    (@malihu)

    Hello,

    There are some themes that apply their own events on menu links that might prevent ‘Page scroll to id’ from scrolling the page.

    I checked the theme (via the link you posted) and it seems that the above case might apply here. The theme’s navigation manu links have additional js click events and I saw that the theme loads the ‘jQuery Smooth Scroll’ plugin which probably handles all same-page links.

    I’m not sure if this applies on all same-page links or only on menu links. You can confirm this by creating an off-menu link and see if page scrolls smoothly.

    In any case, try to see if this functionality can be disabled by some theme setting. If there’s no such setting/option, you’ll need to manually disable the ‘jQuery Smooth Scroll’ events on same-page links and let ‘Page scroll to id’ handle the links. To do this, you have to add an extra js script in your theme (e.g. in some template like header.php or footer.php, in functions.php or in some custom javascript field provided by the theme):

    <script>
    (function($){
    	$(window).load(function(){
    		$("a._mPS2id-h").unbind("click.smoothscroll");
    	});
    })(jQuery);
    </script>

    Let me know

Viewing 1 replies (of 1 total)

The topic ‘Not scrolling in Shapely Theme’ is closed to new replies.