Jump to content

CSS code to add a link

Recommended Posts

Hi there,

I need a code, so that I will have a link at the bottom of each project, which points to the main page. Atm there are only buttons which lead to the next or previous site. I could of course add a new section or a button in the footer. But this all doesn't look good. Is there a way to do this?

Forum.png

Forum2.png

Link to comment
  • Replies 6
  • Views 1.1k
  • Created
  • Last Reply
On 1/24/2021 at 12:17 AM, Horizonte said:

Hi tuanphan,

I use the Business plan. Here is the link to my webpage. https://ulibortz.squarespace.com

thx in advance

Add to Project Page Header

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
jQuery(document).ready(function($) { 
   $('<div class="sqs-block-button button-block"><div class="sqs-block-button-container--center"><a href="https://beaverhero.com" class="sqs-block-button-element--small sqs-block-button-element">BACK TO ALL PROJECTS</a></div></div>').insertAfter('.item-pagination[data-collection-type^="portfolio"]');
 }); 
</script>

image.thumb.png.e0804e8e4a6e545b3f1786d9ced44c7b.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...

Hi tuanphan,

doesn´t work. When I replace your URL with mine, I get a page not found. Also the frame dissapears.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<script>

jQuery(document).ready(function($) {

   $('<div class="sqs-block-button button-block"><div class="sqs-block-button-container--center"><a href="https://ulibortz.squarespace.com/orte“ class="sqs-block-button-element--small sqs-block-button-element">BACK TO ALL PROJECTS</a></div></div>').insertAfter('.item-pagination[data-collection-type^="portfolio"]');

});

</script>

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.