Adding Links to Sections of the Same Page ("Adding On-Page Anchor Links")

Sometimes you may be inclined to link a piece of text or a button to another section of content further down on the same page. While this is not directly a feature of SiteSwan, you can technically make it happen.

You can make this happen if you are comfortable sifting through the code of the site. Here’s what we mean:

If you view the Source Code (a feature every browser has) and look at the ARTICLE element wrapping each post, just take the contents of the "id" attribute (not "data-id") and add it to the end of the URL, prefixed with a #.

For example, this URL will take you to the “Italian Specialties & Much More” image post on the "Our Foods" page of this site:

https://www.dursos.com/our-foods#post_216821

A trick for finding where the ARTICLE is within the code is to search the code (Command-F on Mac, or Control-F on PC) to find some text associated with that post. In this case we searched "Italian Specialties" and it came right up...we just backtracked a bit in the code to the ARTICLE element that preceded it, and copied the post ID.

Below is a screenshot of the code for this page and you'll see the post ID highlighted in blue.

article-id.png

Have more questions? Submit a request

Comments

Powered by Zendesk