Jump to content

Have Portfolio Link to External Sites Instead of Default Portfolio Pages

Recommended Posts

Hi there, 

I'm trying to create a page on my website to display my website work. Rather than creating individual pages within the portfolio for each site, I'd rather just have it link to the sites themselves. Is there a way to do this without URL mapping?

I followed this thread - 

However, I have the Squarepaste Portfolio Filter Code in place so the code from the above thread did not work with the filter.  

Here is the page - https://studioeleven11.co/websites

My developer is OOO atm & I'd like to get this up this weekend so thank you in advance!

Link to comment

If you use Universal Filter Plugin to add dropdown filters, you can follow these steps to change url

I did an example for Project 01, Project 02 here

https://thung.squarespace.com/portfolio-filter?noredirect

pass: abc

(1) Add hooks code to this position

 hooks: {
          	onFilter: function (f) {
                        externalLink(f);
                    }
          }

image.png.1311d8910d9d7e75b5869cbfca161885.png

(2) Add jQuery code above Universal Filter Plugin code

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

(3) Add this code to on top of Filter Plugin code, but under <script> tag

 var externalLink = function (f) {
       $('a.grid-item[href="/portfolio-filter/project-one-j5z9d"]').attr('href','https://google.com');
    $('a.grid-item[href="/portfolio-filter/project-two-j6ehw"]').attr('href','https://amazon.com');
    $('a.grid-item').attr('target','_blank');
    };

image.png.4703336bb7c94b0656bdd32e396cc004.png

(4) red arrow is Portfolio Item URL

image.png.20cb96185f16cd4483db01f75d4536eb.png

image.thumb.png.31218cc1da03ba55c2eac6c302b87505.png

 

image.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
  • 3 months later...
On 6/18/2024 at 12:41 AM, dnmddy said:

@tuanphanI've followed the above steps and triple checked them but it's not working,,

https://www.drewdenny.com/

first portfolio item, "Second Nature"

The code for Portfolio Page use Universal Filter Plugin Only

with standard Portfolio Page, no Filter plugin, use this code to Code Injection Footer or Page Header Code Injection.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('a.grid-item[href="/portfolio/second-nature"]').attr('href','https://google.com');
});
</script>

replace Google with new url

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

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.