1

I've got a site built on the Genesis framework with Cafe Pro child theme.

http://salat.md/

The main menu has anchor links that scroll to the relevant section of the front page. They work perfectly fine in Firefox, but stopped working in Chrome and Opera.

I've checked the demo site of the Cafe Pro Theme, and the same problem persists. https://my.studiopress.com/themes/cafe/#demo-full

I didn't build the site and can't reach the guy who built it, so I don't have access to studiopress members' area.

Any input is appreciated.

D.Gitlan
  • 11
  • 2
  • Hey, it looks like you may have solved this problem. I'm hitting the same bug with another Genesis theme. How did you solve it? – dave Dec 06 '17 at 18:34

2 Answers2

0

I'm not using Cafe Pro, but another Genesis child theme and was able to resolve this issue by updating to the latest release of both jQuery.localScroll and jQuery.ScrollTo. The files were both of these were included in my theme's /js/ directory. I updated the files there and then updated the wp_enqueue_script lines to contain the latest version numbers.

wp_enqueue_script( 'localScroll', get_stylesheet_directory_uri() . '/js/jquery.localScroll.min.js', array( 'scrollTo' ), '2.0.0', true );
wp_enqueue_script( 'scrollTo', get_stylesheet_directory_uri() . '/js/jquery.scrollTo.min.js', array( 'jquery' ), '2.1.2', true );
dave
  • 2,762
  • 1
  • 16
  • 32
0

Got the same problem.

It can be related with some domain redirects. Lets say you configured a reverse proxy (like traefik or nginx) that redirects every request from www.example.com to example.com. Therefore, you and your visitors interact with your page over the example.com domain.

If you add a menu entry in WordPress to www.example.com/#about it won't work as expected because your reverse proxy will redirect www.example.com/#about to example.com/#about. Thus, you will end up at the About-Page, but with a hard redirect instead of a smooth scrolling.

If you set the domains correctly, check the included scripts as well if they are embedded as www.example.com/.../script.js. If so, change it by removing the leading www. because some browsers don't like it.

mhellmeier
  • 1,982
  • 1
  • 22
  • 35