Jump to content

Adding section to one product page not all product pages

Recommended Posts

There may be a way. Please give us the exact product page you want the section to appear on.

Also are you aware that each product has an additional info area in the product editor?

Your site private. Please set up a site-wide password.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the documentation at the link provided to understand how it works.

Please read the documentation at the link provided on how to share a link to your site to understand how it works. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

We can then take a look at your issue.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

ClarificationI have 21 Category pages in my Shop, and I was trying to add a "section" to only one of the category pages, however the added section appears on all 21 category pages.  Is there anyway to limit the added section to the designated category page?

Link to comment

The is a bit involved because we need to bing severals elements together to create the overall effect.

Step 1.

Please see the following.

Step 2.

Then you'll want to see the following.

Step 3.

Add the following to Store Settings > Advanced > Page Header Code Injection for the store page. Please see per-page code injection.

<style>

  body:not( [data-store-category="Silk All-in-One Mineral Paint"] ) [data-section-id="632cae260df42d4736762532"] {
  
    display : none;
    
    }
    
  </style>

This is for v7.1 and specific to the posters need.

Let us know how it goes.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Thanks for your help.  It appears the Section targeted to the Category page "Silk All-in-One Mineral Paint" appears only on that Category page however a spacing problem has developed between the Site Header and the first row of the product line on the other Category pages.

Appreciate any thoughts.

Edited by Tim_H
additional information
Link to comment
On 9/24/2022 at 12:41 PM, Tim_H said:

however a spacing problem has developed between the Site Header and the first row of the product line on the other Category pages.

It appears you've not done Step 2. mentioned in my previous post. This step is critical to overcome the spacing issue.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Added Step 2 to Page Settings>Advanced>Page Header Code Injection (code lines 1503 - 1534).  It appears it has not corrected the problem.  Maybe I have inserted in code in the wrong injection location. Any thoughts?

Sorry about my coding ignorance.

Thanks

Link to comment

You now have syntax errors  in the code. It appears that some code may have been dropped into the middle of other code.

1283616007_ScreenShot2022-09-26at3_17_26PM.png.03e2e8f98d648840572205891334b54a.png

There is no way I can describe how to fix it. My only suggestion would be to start again making sure to be very careful where code is placed.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
18 hours ago, creedon said:

You now have syntax errors  in the code. It appears that some code may have been dropped into the middle of other code.

1283616007_ScreenShot2022-09-26at3_17_26PM.png.03e2e8f98d648840572205891334b54a.png

There is no way I can describe how to fix it. My only suggestion would be to start again making sure to be very careful where code is placed.

Thanks for your response.

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.