[Resolved] Anchor Tags (Again)

Home Forums Support Anchor Tags (Again)

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #223829
    Steve

    I’m still fighting anchor tags and trying to get them to scroll to the proper point. The Elementor folks don’t seem to see the problem that I and others have seen in that it scrolls 90px or so too far. I’m having better luck with a couple of plugins and I’ll get that solved eventually.

    Anyway, that’s not the purpose of this request. My version of a “One-page” theme is actually a “two-page” theme. A classic one-pager and a blog page. Seems to make sense – at least to me!

    My test site is here:

    http://nothingdumber.com/

    The scroll to anchor works – sort of – for the Contact, About Us, and Locate Us links. If I go to the Blog page, those items are totally inert – nothing happens. The Home button does work.

    I’m rather sure this falls into the Mills – You Idiot category, but I’m stumped. What am I missing?

    Thanks

    PS Tom – I know you are working on some Premium themes. I, for one, would be most willing to purchase a quality one-pager wthh dot nav etc.

    #223890
    Tom
    Lead Developer
    Lead Developer

    That’s strange, the fact that you’ve linked to the home page with the # should make it work regardless of the page you’re on.

    What happens when you remove the code you have in the wp_footer hook? Still doesn’t work?

    A one pager theme is definitely on the menu πŸ™‚

    #224008
    Steve

    Thanks, Tom

    The code in the wp_footer hook seems to be at the root cause. I’m still having issues with where it lands, but, at least” it’s going back to the right page. (FWIW this is the code you pointed me to for resolving the menu getting “stuck” down on mobile. I haven’t worked on mobile here, so not sure if that is still an issue.)

    Hoping this is still on topic – if I change the hover color to red, only the “Blog” item changes when I go over it. After using on of the other items, it changes after the scroll. Plugin issue?

    #224049
    Lyle

    Hi Steve,

    For the scroll to location along with correct active menu item highlighting, perhaps take a look at a video I put together on the subject of a one page web site as you are wanting to achieve. I haven’t tried this with GP with it’s own sticky menu, so you may not need the plugin mentioned that does that part.

    http://snifflevalve.com/tutorials/dynamik-website-builder-beaver-builder-one-page-website-with-smooth-scroll

    And here is a site that I build that uses this method:

    http://www.cfwzz.ca

    I am going to work on trying this method with GP and Elementor and will post back when I get it working πŸ™‚

    Cheers!
    Lyle

    http://snifflevalve.com
    Tutorials and tips for GeneratePress, WP Show Posts, WordPress and Elementor

    #224129
    Tom
    Lead Developer
    Lead Developer

    Thanks, Lyle!

    Hoping this is still on topic – if I change the hover color to red, only the β€œBlog” item changes when I go over it. After using on of the other items, it changes after the scroll. Plugin issue?

    Not too sure what you mean by this – can you show me?

    #224268
    Steve

    Lyle – What a good site! At this point, Dynamik and BB are a little beyond my budget. To be greedy – I kind of like dot navigation, but nothing critical. Anxious to see your results with Elementor and GP. Steve

    Tom – Try this – I have the menu hover color set to red. If you pass the mouse over the menu items, only the “Blog” item actually changes color. If, you click the “Contact” item, for instance, it will scroll to that anchor and then change to red. Is that what I should expect?

    Thanks…..
    Steve

    #224334
    Tom
    Lead Developer
    Lead Developer

    Ah, that’s because all of the other menu items are current menu items.

    You can set this manually like this:

    .main-navigation .main-nav ul .current-menu-item > a:hover {
        background: red;
    }
    #224462
    Steve

    OK – Looking up. Since I removed the code in wp_footer, the menu sticks down as it did originally.

    Any options here?

    Steve

    #224529
    Tom
    Lead Developer
    Lead Developer

    Is this the code?: https://gist.github.com/generatepress/6e122667d28cabd23582

    I just re-tested it and didn’t get any errors.

    Can you try re-adding it?

    #224671
    Steve

    I re-added the code and I get back to my original issue. If I go the the “Blog” page, I cannot link back to the original page with any menu item except “Home”. The others Contact” etc just do nothing. The link is still:

    http://nothingdumber.com/

    Steve

    #224694
    Tom
    Lead Developer
    Lead Developer

    I just updated the code, can you try it now?

    #224711
    Steve

    Tom,

    I put in the new code and the links back to the home page still don’t work. I believe I cleared all caches and double checked that the latest revisions were there.

    Steve

    #224714
    Tom
    Lead Developer
    Lead Developer

    Just made another adjustment.

    We’ll get there πŸ™‚

    #224739
    Steve

    That seems to work!!

    I haven’t tested the close menu code, but that should work.

    I’ll let you know if there are any issues.

    Thanks…….
    Steve

    #224740
    Tom
    Lead Developer
    Lead Developer
Viewing 15 posts - 1 through 15 (of 20 total)
  • You must be logged in to reply to this topic.