- AuthorPosts
- January 13, 2021 at 4:07 pm #32933MonicaGuest
Is there a way to add a link to a block? I see that I am able to add a button and can add a hyperlink, but how do I make it so that a certain block highlights and has a certain link attached?
January 13, 2021 at 4:08 pm #32947Jesse OwensKeymasterHi Monica-
Linking to a specific block, or element on your page, is known as using an Anchor Link. Check out our detailed guide on using Anchor Links in BoldGrid.
Here’s the video tutorial from that guide:
January 14, 2021 at 1:48 pm #32967MonicaGuest@jesseowens,
Thank you for that information!I am more interested in adding a link to an element on the home page that that directs you to a different page.. Ex. Linking an element on the page to my “about us” page (not in a button or a hyperlink, but rather a block with a link).
January 14, 2021 at 3:03 pm #32973Jesse OwensKeymasterHi Monica-
Thanks for the clarification, sorry I misunderstood what you were going for.
This question has been a thorn in web designers’ sides for quite some time.
When HTML5 was released, it was the first time that it became “valid” to wrap an entire content block in a link- as long as there is no other “interactive” content inside the block, but WordPress and BoldGrid’s Post and Page Builder don’t provide a way to do it in the Visual Editor.
There are also arguments to be made that it’s bad for accessibility and SEO- both screen readers and search engine crawlers use the text inside a link to provide context for what the link is about.
All that being said, you can accomplish this if you like. I took a minute to record this short video to show you how.
Here’s the code from the video. First, add the onclick action:
onclick="window.location.href='/contact-us/';"
Then, add the CSS to turn the user’s cursor into a pointer:
style="cursor: pointer;"
January 18, 2021 at 11:15 am #33008MonicaGuestThis helps a lot, thank you so much for taking the time to answer and make the video!
January 18, 2021 at 11:16 am #33033Jesse OwensKeymasterHappy to help Monica, thanks for the fantastic question!
- AuthorPosts
- The topic ‘[Resolved] How do I make an entire block into a link?’ is closed to new replies.