Getting navigation menu button to scroll to page section

Support Area Forums Moonrise Getting navigation menu button to scroll to page section

Tagged: 

Viewing 14 posts - 1 through 14 (of 14 total)
URL to the page in question: http://client.dev.recipesocial.net/
  • Author
    Posts
  • #28044
    RecipeSocial
    Participant

    Hi Bill,

    I’m just putting together a new site and for the life of me can’t figure out how to get the nav menu button to scroll to the right section on the home page when they are clicked on.

    I have created individual pages and selected home for each. but i can’t find any other settings to enable this feature.

    Please can you let me know where i’m going wrong.

    Thanks,
    Christian.

    #28046
    Bill Robbins
    Moderator

    Good Morning Christian,

    Great question. You can do that. In your navigation menu builder (Appearance > Menus in your dashboard), instead of adding pages to your menu, look in the left hand side there for the “links” section. Click on that. This lets you add a link to any URL.

    Each section of the home page has a unique ID that we can use to link to it. They follow this format:

    • #one
    • #two
    • #three
    • and so on.

    To use those in the links section, remove the http:// that’s there by default and use the #one, #two, #three that goes with the section you’re linking to. For the second section you would use #two as the URL. Add a label, that’s the text that will be in your navigation menu and insert the link into your menu. Save your changes and you’ve just created a link for the same page.

    If you run into trouble there, let me know.

    Have a great day,
    Bill

    #28145
    RecipeSocial
    Participant

    Hi Bill,

    Got it, thanks.

    One question though.

    I noticed when I clicked on the recruitment page, and taken to the recruitment page, when I try clicking on any of the nav. menu links, none of them work. I can only get back to the home page by clicking on the logo.

    Have I missed something when setting the nav. menu up?

    Thanks,
    Christian.

    #28151
    Bill Robbins
    Moderator

    Good question. When the navigation menu links are set to be for a “single page” site, they won’t work on “inside pages” since the links are all relative to sections of the home page.

    One thing you could do is change the links in the navigation menu by adding http://yoursite.com before the #two and so on. The full link would look something like http://yoursite.com#two . That should let you have links that work on inside pages too. Let me know if that doesn’t do it.

    Have a great day,
    Bill

    #28158
    RecipeSocial
    Participant

    Hi Bill,

    Mmm okay. Is there any other way around this?

    As it’s not good to use # in URLs for SEO.

    Thanks,
    Christian.

    #28159
    Bill Robbins
    Moderator

    Since it’s a one page site, the # won’t make a difference for SEO. Outside of the recruitment page, all your content is on the home page.

    #28169
    RecipeSocial
    Participant

    Hi Bill,

    Are you saying, since it’s a one page site, it’s not the best for SEO anyway?

    I’ve seen lots of talk on various SEO site regarding parallax/flat design one page sites.

    With the way the site is currently structured, would the pages not get crawled and indexed by Google?

    Thanks,
    Christian.

    #28170
    Bill Robbins
    Moderator

    Sorry for not being clear about that. One page sites can be fine for SEO. I’m just saying that having links like that won’t make a difference in this case since it’s a one page site.

    #28173
    RecipeSocial
    Participant

    No problem. I’m just trying to figure out the best way to structure the site for SEO purposes, so that it wouldn’t need restructuring further down the line.

    Any suggestions on how to best go about this would be much appreciated.

    I spoke with a leading SEO agency and they said that using hash tags in the URL is a big no no, from an SEO point of view.

    Thanks,
    Christian.

    #28181
    Bill Robbins
    Moderator

    There is a conditional menu item plugin for WordPress (https://wordpress.org/plugins/menu-items-visibility-control/). You can use it to specify where a navigation menu item is present. You could use it to create the hashed URL’s only on your recruitment page and have the regular ones on your home page.

    It makes use of WordPress conditional tag system to specify where something can be seen. To hide something on the home page you would use this:

    
    ! is_home()
    

    In php a ! means not. So we’re going for not showing on the home page with that. To show on the home page you would use this:

    
    is_home()
    

    That’s an option.

    #28183
    RecipeSocial
    Participant

    Okay, thanks for the info. much appreciated. I’m currently in Malaysia and it’s late here now, so will look at this plugin tomorrow.

    Cheers,
    Christian.

    #28287
    RecipeSocial
    Participant

    Hi Bill,

    I’ve taken a look at the above plugin, but a still not sure how it can help exactly with SEO?

    I have added the site URL to the pages in the navigation menu section, for example: http://client.dev.recipesocial.net/#one and so on. The links now work fine, thanks for the info.

    If I wanted to optimise the page below for search using the Yoast plugin, would it actually make any different if the page was optimised, bearing in mind the structure of this site?

    http://client.dev.recipesocial.net/menu/

    Reason I ask, if I click on the above link, I’m not taken to the section on the home page, instead, i’m taken to a blank page.

    Any guidance you could provide on this matter would be very much appreciated.

    Regards,
    Christian.

    #28291
    Bill Robbins
    Moderator

    Good Morning Christian,

    The link there is close. You have to take out the last slash so it’s like this:

    http://client.dev.recipesocial.net#one

    In a URL past the dot whatever, a slash indicates a sub-folder if this was a basic HTML site. So the browser will be looking for a folder named #one instead a section on the home page. Make sense?

    Using Yoast on a one-page site is fine. It’s grading tools aren’t designed to evaluate the content there. The plugin is made to work with individual blog posts or very basic pages. It can’t test the content that’s added via different methods since it’s not all inside the content box of a single page/post. With that being a very common design of current WordPress themes, it’s a rather large limitation of the plugin.

    It would be more effective if it would evaluate the page as it’s generated on the front end of the site.

    But the plugin is still helpful on a one-page site for adding in a SEO title/description and keywords if you choose to go that route, plus it has good tools for social metadata too.

    Just take the content recommendations with a grain of salt since they are unable to see the whole picture.

    Have a great week,
    Bill

    #28529
    RecipeSocial
    Participant

    Hi Bill,

    I’ve edited the links now and they work fine.

    Thanks for the insight to the Yoast plugin, much appreciated.

    Regards,
    Christian.

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Getting navigation menu button to scroll to page section’ is closed to new replies.