Jump to content

Disabling Portfolio Project Pages in Squarespace Version 7.1

Recommended Posts

Running into problems with the suggested code fix as well-

Part of the problem might be that I have a personal account and am using the portfolio as my home page (it appears custom code isn't available to the homepage on a personal account). 

I tried creating a new portfolio page that isn't used as the homepage, and still the code doesn't appear to be working. I'm not getting any errors, the project is still accessible and visible on the portfolio page

 

EDIT: 

Actually i think i got it sorted: 

I pulled a different bit of code from another one of Tuanphan's Posts and removed some of the more specific bits to that comment. 

a.grid-item[href*="/draft"] {
    display: none;
}

Now it hides any url I add draft too (i've been adding it to the start of the URL, don't know if that is making a difference) even when it is a portfolio page being used as the home page. 

 

Hope this helps others... Ultimately this really shouldn't be so complicated, but I'm glad there's at least an active forum to support these issues. 

Edited by amatho20
Fixed my issue
Link to comment
On 1/14/2021 at 5:51 PM, amatho20 said:

EDIT: 

Actually i think i got it sorted: 

I pulled a different bit of code from another one of Tuanphan's Posts and removed some of the more specific bits to that comment. 



a.grid-item[href*="/draft"] {
    display: none;
}

Yes that helps and did the job. Now I finally have a workflow to edit or create new sites without having them directly online. 

Edited by Horizonte
Link to comment
On 1/24/2021 at 8:18 AM, Horizonte said:

Yes that helps and did the job. Now I finally have a workflow to edit or create new sites without having them directly online. 

Sweet!

 

Only thing i noticed after the fact is that while this hides the draft project from being displayed on the portfolio page, it does not hide it within the pagination navigation between project pages (the arrow's at the bottom of any of your projects linking to the next).

 

My first work around was to slap more simple code in to not display those navigation arrows at all, and add thumbnail links manually.

 

.item-pagination {
  display: none;
}

but adding in thumbnails manually to every page is a pain, and eventually got to this solution which I feel works more harmoniously with the original fix as it relates to the "draft"  in your url slug.

.item-pagination-link[href*="draft"] {
  display: none;
}

Hopefully these work arounds won't be necessary soon...

Link to comment
14 hours ago, amatho20 said:

Only thing i noticed after the fact is that while this hides the draft project from being displayed on the portfolio page, it does not hide it within the pagination navigation between project pages (the arrow's at the bottom of any of your projects linking to the next).

Indeed, I also noticed this. But I found this negligible for the great advantage of this solution. Your new code works fine. But when the page is in between, it unfortunately also hides the thumbnail to the next but one. 

Link to comment
  • 1 month later...


Hi Everyone, 
I saw that so many of you have the same issue as me. You guys provided some useful code options to hide drafts on the portfolio. I used that but unfortunately, there is white space left between the last content and my footer. Is there any way to delete this white space on my homepage after hiding portfolio drafts? If you can help me with it I really appreciated it.
Thank you so much.

Screen Shot 2021-03-06 at 12.06.35 PM.png

Link to comment
11 hours ago, mogutcu9 said:


Hi Everyone, 
I saw that so many of you have the same issue as me. You guys provided some useful code options to hide drafts on the portfolio. I used that but unfortunately, there is white space left between the last content and my footer. Is there any way to delete this white space on my homepage after hiding portfolio drafts? If you can help me with it I really appreciated it.
Thank you so much.

Screen Shot 2021-03-06 at 12.06.35 PM.png

Hi. Can you share link to page in screenshot?

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 weeks later...

I 100% agree. This would also be helpful for shifts in your portfolio. For example, my graphic design agency creates a high volume of material. While, I want to display current work more often than not, it would be helpful to have a complete archive of work even if some projects were not being displayed. 

Link to comment
  • 3 months later...

What the actual F*#k??? What a moronic issue t have! I thought my google search would just point out a badly placed button in the UI, but doesn't exist in the first place!??

This is next level stupid Squarespace.  Sort yourselves out. 

Link to comment
  • 4 weeks later...

Anyone have any idea how to keep the item displayed in the grid but disable the link? I have a few projects that I'm working on the pages for but in the mean time I'd like to keep the thumbnail photo and title visible but block the link.

Edit:

Figured it out (new to CSS). The snippet below seems to do the trick but it's a little wonky as the cursor moves over the element...

.grid-item[href*="draft"]:hover {
  pointer-events: none;
}

 

Edited by kkemper
Link to comment
On 8/15/2021 at 7:43 AM, kkemper said:

Anyone have any idea how to keep the item displayed in the grid but disable the link? I have a few projects that I'm working on the pages for but in the mean time I'd like to keep the thumbnail photo and title visible but block the link.

Edit:

Figured it out (new to CSS). The snippet below seems to do the trick but it's a little wonky as the cursor moves over the element...

.grid-item[href*="draft"]:hover {
  pointer-events: none;
}

 

Can you share link to your site? We can check the cursor problem 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!)

Link to comment
  • 4 weeks later...

Like others in this thread, I also would love it if SquareSpace just made all our lives easier and added an option to add a password on individual projects. I am trying to find a workaround for this issue and created a separate page for the project I want password protected. This works great for the project link I have on my homepage; however, I also still want the thumbnail to show in my gallery. I am trying to find some javascript code to redirect the gallery project on click to the password protected page. Does anyone have any advice on this? 

FYI This is the code I am trying to inject:

<script>var img = document.querySelector(".grid-item[href*='draft']");
img.addEventListener('click', function(e) {
  e.preventDefault();
  window.location = "https://www.urlhere/wherever/u/wanna/go"
});</script>

Edited by mawarner94
Link to comment
On 9/9/2021 at 10:31 AM, mawarner94 said:

Like others in this thread, I also would love it if SquareSpace just made all our lives easier and added an option to add a password on individual projects. I am trying to find a workaround for this issue and created a separate page for the project I want password protected. This works great for the project link I have on my homepage; however, I also still want the thumbnail to show in my gallery. I am trying to find some javascript code to redirect the gallery project on click to the password protected page. Does anyone have any advice on this? 

FYI This is the code I am trying to inject:

<script>var img = document.querySelector(".grid-item[href*='draft']");
img.addEventListener('click', function(e) {
  e.preventDefault();
  window.location = "https://www.urlhere/wherever/u/wanna/go"
});</script>

Hi,

What is your site 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
  • 4 weeks later...

I'm running into the same problem and some of the CSS posted in this thread IS NOT WORKING, like this:

a.grid-item[href*="/draft"] {
    display: none;
}

I have draft in my URL of the project and it still shows. Site is in development so I can't post a public link yet... 

Any ideas? I really need to be able to create work pages that can be hidden from the main grid page.

Link to comment
On 10/4/2021 at 1:11 AM, mycreativecondition said:

I'm running into the same problem and some of the CSS posted in this thread IS NOT WORKING, like this:

a.grid-item[href*="/draft"] {
    display: none;
}

I have draft in my URL of the project and it still shows. Site is in development so I can't post a public link yet... 

Any ideas? I really need to be able to create work pages that can be hidden from the main grid page.

Hi,

If your site is trial/private, you can setup password & share 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
  • 3 weeks later...
On 1/26/2021 at 10:30 PM, amatho20 said:

Sweet!

 

Only thing i noticed after the fact is that while this hides the draft project from being displayed on the portfolio page, it does not hide it within the pagination navigation between project pages (the arrow's at the bottom of any of your projects linking to the next).

 

My first work around was to slap more simple code in to not display those navigation arrows at all, and add thumbnail links manually.

 

.item-pagination {
  display: none;
}

but adding in thumbnails manually to every page is a pain, and eventually got to this solution which I feel works more harmoniously with the original fix as it relates to the "draft"  in your url slug.

.item-pagination-link[href*="draft"] {
  display: none;
}

Hopefully these work arounds won't be necessary soon...

Hey! @tuanphan& @amatho20

 

I have the below pasted in my css it removes a draft from the main summary page but it remains in the pagination when on the prior post in sequence. Was there ever a solution reached for this that I am missing?

 

a.grid-item[href*="/draft"] {
    display: none;
}

 

https://flamingo-goby-tkw6.squarespace.com/manufactured-multi-section
PW: home

In the multi section portfolio

Link to comment
On 10/28/2021 at 6:35 AM, Patterson said:

Hey! @tuanphan& @amatho20

 

I have the below pasted in my css it removes a draft from the main summary page but it remains in the pagination when on the prior post in sequence. Was there ever a solution reached for this that I am missing?

 

a.grid-item[href*="/draft"] {
    display: none;
}

 

https://flamingo-goby-tkw6.squarespace.com/manufactured-multi-section
PW: home

In the multi section portfolio

Can you share link to a page where pagination appears draft link? WE can check & give the code 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!)

Link to comment
On 11/8/2021 at 12:05 PM, Patterson said:

Add to Design > Custom CSS

.item-pagination-link--next[href*="draft"] {
    display: none;
}

 

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.