I want to add menu items like 'projects#recent' and 'projects#featured' where both links redirects to same page but different sections. how can I do this ?
1 Answer
You need to follow these steps.
- Decide a target location on the page.
- Assign an ID to the HTML element occupying that location. That element could be a h (header) tag, a paragraph etc.. This is the exact code I use to assign an ID to the bottom of this post:
<p id="postbottom">You’ve reached the bottom> of the post</p>
You can add an id attribute to any element -<div>, <span>, <p>, <a> , <img>
etc.- If you don’t have an element there (i.e. you are jumping into a middle of a long paragraph), just create one -enclosed a word with a … tag and add in the id.
After that you can go to the menu link and add the name of the page and the name of your id. In this case your ids are going to be recent and featured.