Izabellabuzogany Posted February 16 Share Posted February 16 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! Earvin 1 Link to comment
tuanphan Posted February 18 Share Posted February 18 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); } } (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'); }; (4) red arrow is Portfolio Item URL Earvin 1 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
dnmddy Posted June 17 Share Posted June 17 @tuanphanI've followed the above steps and triple checked them but it's not working,, https://www.drewdenny.com/ first portfolio item, "Second Nature" Link to comment
tuanphan Posted June 19 Share Posted June 19 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
dnmddy Posted June 24 Share Posted June 24 @tuanphan that duplicated the portfolio item in the grid so now there is the one that links off site and one next to it that links to the project page. Also doesnt work on the portfolio filtered page. I believe I am in fact using the universal filter plugin. Link to comment
tuanphan Posted June 26 Share Posted June 26 I remember the page doesn't install Filter on June 19 (or you have problem so Filter doesn't run on that time) Now with filter plugin, page source code changed so it won't work. You can follow code in top comment again, replace corresponding url in (3) and (4). 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
TFV Posted October 7 Share Posted October 7 Dear @tuanphan, Hope you're well! I have a similar question to which I didn't find a solution yet. I have created a portfolio page (layout: hover background) where the background shows an image of the client when hovering on the clients name. However, I want to link the clients name to their website instead of an new portfolio page. I know there are different sorts of gallery sections existing out there as well, it could perhaps be easer to create/forward me a code where I use a 'classical' gallery section with full bleed to serve as background that changes when hovering over text in a text block. Not sure about what you think would be the best solution for this, you're wiser than me on this. Page: https://pigeon-orange-9lng.squarespace.com/ Password: abc Many thanks in advance! Link to comment
tuanphan Posted October 9 Share Posted October 9 On 10/7/2024 at 8:41 PM, TFV said: Dear @tuanphan, Hope you're well! I have a similar question to which I didn't find a solution yet. I have created a portfolio page (layout: hover background) where the background shows an image of the client when hovering on the clients name. However, I want to link the clients name to their website instead of an new portfolio page. I know there are different sorts of gallery sections existing out there as well, it could perhaps be easer to create/forward me a code where I use a 'classical' gallery section with full bleed to serve as background that changes when hovering over text in a text block. Not sure about what you think would be the best solution for this, you're wiser than me on this. Page: https://pigeon-orange-9lng.squarespace.com/ Password: abc Many thanks in advance! You can use this code to Website Tools > Code Injection > Footer. This is code for first 3 items, you can repeat similar for other items. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> jQuery(document).ready(function($){ $('a.portfolio-hover-item[href="/home/maruani-mercier"]').attr('href','https://google.com'); $('a.portfolio-hover-item[href="/home/jozef-wouters"]').attr('href','https://ebay.com'); $('a.portfolio-hover-item[href="/home/pierre-marie-giraud"]').attr('href','https://amazon.com'); }) </script> TFV 1 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
TFV Posted October 14 Share Posted October 14 On 10/9/2024 at 10:15 AM, tuanphan said: You can use this code to Website Tools > Code Injection > Footer. This is code for first 3 items, you can repeat similar for other items. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> jQuery(document).ready(function($){ $('a.portfolio-hover-item[href="/home/maruani-mercier"]').attr('href','https://google.com'); $('a.portfolio-hover-item[href="/home/jozef-wouters"]').attr('href','https://ebay.com'); $('a.portfolio-hover-item[href="/home/pierre-marie-giraud"]').attr('href','https://amazon.com'); }) </script> Thanks, you're a hero! Can you add something to the code so that the links open in a new web page? Many thanks! Link to comment
tuanphan Posted October 16 Share Posted October 16 On 10/14/2024 at 8:14 PM, TFV said: Thanks, you're a hero! Can you add something to the code so that the links open in a new web page? Many thanks! You can use this <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> jQuery(document).ready(function($){ $('a.portfolio-hover-item').attr('target','_blank'); $('a.portfolio-hover-item[href="/home/maruani-mercier"]').attr('href','https://google.com'); $('a.portfolio-hover-item[href="/home/jozef-wouters"]').attr('href','https://ebay.com'); $('a.portfolio-hover-item[href="/home/pierre-marie-giraud"]').attr('href','https://amazon.com'); }) </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!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment