Jump to content

Custom URL Slug for Portfolio Items

Recommended Posts

  • Replies 6
  • Views 901
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...
Posted
On 2/3/2021 at 6:35 PM, ischa.vieten said:

@tuanphan Could you help us out with the script to change the clickthrough URL's. I want the portfolio effect, but then link each item to a custom page and url instead of a portfolio page with fixed url. Many thanks in advance!

 

On 2/3/2021 at 6:35 PM, ischa.vieten said:

@tuanphan Could you help us out with the script to change the clickthrough URL's. I want the portfolio effect, but then link each item to a custom page and url instead of a portfolio page with fixed url. Many thanks in advance!

Can you share site url?

They used this code

<script>
(function(){
	window.addEventListener('load', function() {
	var link = document.querySelector('a[href="/plainspaces/danielhex"]');
     link.target="_blank"; link.rel="noopener noreferrer"; link.href = 'https://www.instagram.com/danielhex/';
})
  
  	window.addEventListener('load', function() {
	var link = document.querySelector('a[href="/plainspaces/trentmadison"]');
     link.target="_blank"; link.rel="noopener noreferrer"; link.href = 'https://www.instagram.com/trentxmadison/';
})
  
  	window.addEventListener('load', function() {
	var link = document.querySelector('a[href="/plainspaces/obedpadilla"]');
     link.target="_blank"; link.rel="noopener noreferrer"; link.href = 'https://www.instagram.com/obedpadilla_/';
})
  
    	window.addEventListener('load', function() {
	var link = document.querySelector('a[href="/plainspaces/jerm"]');
     link.target="_blank"; link.rel="noopener noreferrer"; link.href = 'https://www.instagram.com/jermtown/';
})
  
    	window.addEventListener('load', function() {
	var link = document.querySelector('a[href="/plainspaces/loudy-luna"]');
     link.target="_blank"; link.rel="noopener noreferrer"; link.href = 'https://www.instagram.com/loudyluna/';
})
  
  
})()

</script>

 

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!)

  • 1 year later...
Posted

Hi @tuanphan - I'm trying to do a similar thing for the new website I'm designing.

I am keen on having the functionality of the portfolio hover page to be the homepage, but I want the last portfolio item to link to a different page.

I saw the above code but was wondering if you might offer some clarification on how to adjust it to my needs. Happy to share the website if that helps.

Thanks in advance!

Posted
On 12/30/2022 at 11:27 PM, jonasberry said:

Hi @tuanphan - I'm trying to do a similar thing for the new website I'm designing.

I am keen on having the functionality of the portfolio hover page to be the homepage, but I want the last portfolio item to link to a different page.

I saw the above code but was wondering if you might offer some clarification on how to adjust it to my needs. Happy to share the website if that helps.

Thanks in advance!

What is your site url? We can help easier

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!)

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.