{"id":106,"date":"2013-01-07T14:51:28","date_gmt":"2013-01-07T14:51:28","guid":{"rendered":"http:\/\/engage.augsburg.edu\/mannj\/?p=106"},"modified":"2021-05-07T11:51:04","modified_gmt":"2021-05-07T16:51:04","slug":"linking-to-a-part-of-a-page","status":"publish","type":"post","link":"https:\/\/engage.augsburg.edu\/mannj\/2013\/01\/07\/linking-to-a-part-of-a-page\/","title":{"rendered":"Linking to a part of a page"},"content":{"rendered":"<p>If you have a page with a lot of content, you may want to provide links at the top of the page that will jump a visitor to a certain portion of the page. We call this kind of link a &#8220;page jump,&#8221; so I will refer to these as &#8220;jump links.&#8221; Here&#8217;s how you can do this easily in WordPress.<!--more--><\/p>\n<h2>Link, Anchor, and ID<\/h2>\n<p>Each page jump has two parts: a link and an anchor. The link is the thing you click, and the anchor is the place where the link takes you. These are connected by the use of a unique nickname, an ID. An ID should ideally be one word: it can be multiple words separated by hyphens or underscores, and can have numbers, but <em>cannot<\/em> contain spaces.<\/p>\n<h2>Step 1: Create the link<\/h2>\n<p>Start by creating the link to the portion of the page you want. Decide on an ID. In my example, my link says &#8220;What is the cost?&#8221; and links to an area of the page about the cost of the event, so my ID is simply &#8220;cost&#8221;. Highlight your text and <a title=\"Text Links\" href=\"http:\/\/engage.augsburg.edu\/mannj\/2013\/10\/28\/text-links\/\">create your link in the normal way<\/a>, but the URL should only be the # sign followed by your id: in my case, #cost. It should look like this:<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-large wp-image-823\" title=\"anchor-link1\" src=\"http:\/\/engage.augsburg.edu\/mannj\/files\/2013\/01\/anchor-link1-500x277.png\" alt=\"\" width=\"500\" height=\"277\" srcset=\"https:\/\/engage.augsburg.edu\/mannj\/files\/2013\/01\/anchor-link1-500x277.png 500w, https:\/\/engage.augsburg.edu\/mannj\/files\/2013\/01\/anchor-link1-300x166.png 300w, https:\/\/engage.augsburg.edu\/mannj\/files\/2013\/01\/anchor-link1.png 567w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<h2>Step 2: Create the Anchor<\/h2>\n<p>After creating the link, choose the place on the page you want to link to. Instead of having to go into the &#8220;text&#8221; view and mess with the code, you just need to put in the &#8220;anchor&#8221; shortcode I have created. Replace &#8220;cost&#8221; with the ID that matches your link (note that the anchor does not contain the # symbol):<\/p>\n<p>[anchor id=&#8221;cost&#8221;]<\/p>\n<p>Create the anchor above the text that corresponds to it. Notice in my example here that the anchor is above my headline, &#8220;What is the cost?&#8221;<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-824\" style=\"border: 1px solid black;\" title=\"anchor-link2\" src=\"http:\/\/engage.augsburg.edu\/mannj\/files\/2013\/01\/anchor-link2.png\" alt=\"\" width=\"420\" height=\"287\" srcset=\"https:\/\/engage.augsburg.edu\/mannj\/files\/2013\/01\/anchor-link2.png 420w, https:\/\/engage.augsburg.edu\/mannj\/files\/2013\/01\/anchor-link2-300x205.png 300w\" sizes=\"(max-width: 420px) 100vw, 420px\" \/><\/p>\n<p>And that&#8217;s all! Now repeat the process for each link you want to create.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have a page with a lot of content, you may want to provide links at the top of the page that will jump a visitor to a certain portion of the page. We call this kind of link a &#8220;page jump,&#8221; so I will refer to these as &#8220;jump links.&#8221; Here&#8217;s how you [&hellip;]<\/p>\n","protected":false},"author":112,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/engage.augsburg.edu\/mannj\/wp-json\/wp\/v2\/posts\/106"}],"collection":[{"href":"https:\/\/engage.augsburg.edu\/mannj\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/engage.augsburg.edu\/mannj\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/engage.augsburg.edu\/mannj\/wp-json\/wp\/v2\/users\/112"}],"replies":[{"embeddable":true,"href":"https:\/\/engage.augsburg.edu\/mannj\/wp-json\/wp\/v2\/comments?post=106"}],"version-history":[{"count":7,"href":"https:\/\/engage.augsburg.edu\/mannj\/wp-json\/wp\/v2\/posts\/106\/revisions"}],"predecessor-version":[{"id":1221,"href":"https:\/\/engage.augsburg.edu\/mannj\/wp-json\/wp\/v2\/posts\/106\/revisions\/1221"}],"wp:attachment":[{"href":"https:\/\/engage.augsburg.edu\/mannj\/wp-json\/wp\/v2\/media?parent=106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/engage.augsburg.edu\/mannj\/wp-json\/wp\/v2\/categories?post=106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/engage.augsburg.edu\/mannj\/wp-json\/wp\/v2\/tags?post=106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}