Jump to content

Hide particular Category labels from metadata

Recommended Posts

Hi everyone, 

In the backend of the website, I have add a series of categories to help support the filtering. However, there are only a certain range of categories I wish to display (under titles) in a Summary Basic Grid.

Is there a way to black out hide certain category labels?

Thanks if your can help 🙂 

Screenshot 2020-05-19 at 19.57.22.png

Link to comment
  • Replies 27
  • Views 2.3k
  • Created
  • Last Reply
22 minutes ago, Deano84 said:

Of course: https://www.wedesignhomes.co.uk/practiceoverview

password: designwins01

Thank you

 

Add to Home > Design > Custom CSS

.summary-metadata [href*="East+of+England"] {
    display: none !important;
}
.summary-metadata [href*="London+and+South+East"] {
    display: none;
}

Repeat for other tags

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
22 minutes ago, Deano84 said:

Amazing thank you @tuanphan - are you able to help with this page as well?

https://www.wedesignhomes.co.uk/practices/gruff-architects

 

which tags?

12 minutes ago, Deano84 said:

@tuanphan - also having issues with the lone 'commas' from hiding the categories. Thanks again,

It seems time-consuming if using CSS to handle. Which plan do you use? Personal or Business, If Business, I think we can try JavaScript to solve

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 5/20/2020 at 2:34 PM, tuanphan said:

which tags?

@tuanphan It is the same categories as the overview page (London and South East, South West, The Midlands, North West, North East, Yorkshire and The Humber, East of England, Scotland, Wales, Northern Ireland, Republic of Ireland). I would like to remove all the visual metadata relation to areas.

On 5/20/2020 at 2:34 PM, tuanphan said:

It seems time-consuming if using CSS to handle. Which plan do you use? Personal or Business, If Business, I think we can try JavaScript to solve

@tuanphan - Thanks! I have a business account.

Link to comment
On 5/23/2020 at 10:52 PM, Deano84 said:

hi @tuanphan - I was just wondering if you had the chance to looking into this me? Your help is extremely valuable to me.
Many thanks

Add to Home > Design > Custom CSS. Repeat similar for other tags

body#item-5ebaba888d50c53c3b6ef10a {
  span.blog-item-category-wrapper:nth-child(7), span.blog-item-category-wrapper:nth-child(8) {
      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
21 hours ago, tuanphan said:

Add to Home > Design > Custom CSS. Repeat similar for other tags


body#item-5ebaba888d50c53c3b6ef10a {
  span.blog-item-category-wrapper:nth-child(7), span.blog-item-category-wrapper:nth-child(8) {
      display: none;
  }
}

 

Amazing - thank you @tuanphan -  I have just one last request for help. Is there anyway of hiding the redundant "commas" in the Summary Grid metadata. See image.

Speak soon

Screenshot 2020-05-26 at 11.11.06.png

 

 

Link to comment
10 minutes ago, tuanphan said:

Hi. Sorry for the delay. Add this to Practices page settings > Advanced > Header


<script>
  var a=['\x69\x6e\x6e\x65\x72\x54\x65\x78\x74','\x72\x65\x70\x6c\x61\x63\x65','\x6c\x65\x6e\x67\x74\x68','\x65\x74\x61\x64\x61\x74\x61','\x71\x75\x65\x72\x79\x53\x65\x6c\x65\x63','\x2e\x73\x75\x6d\x6d\x61\x72\x79\x2d\x6d','\x53\x71\x75\x61\x72\x65\x73\x70\x61\x63'];(function(b,e){var f=function(g){while(--g){b['push'](b['shift']());}};f(++e);}(a,0x1e1));var b=function(c,d){c=c-0x0;var e=a[c];return e;};window[b('\x30\x78\x31')+'\x65']['\x6f\x6e\x49\x6e\x69\x74\x69\x61\x6c\x69'+'\x7a\x65'](Y,()=>{var c=document[b('\x30\x78\x36')+'\x74\x6f\x72\x41\x6c\x6c'](b('\x30\x78\x30')+b('\x30\x78\x35'));for(var d=0x0;d<c[b('\x30\x78\x34')];++d){var e=c[d];e['\x69\x6e\x6e\x65\x72\x48\x54\x4d\x4c']=e[b('\x30\x78\x32')][b('\x30\x78\x33')](/,/g,'');}});
</script>

 

Thank you @tuanphan - but the code does not seem to be working. Do you think i may need to get a coder in to take a more details look?

 

Link to comment
5 minutes ago, Deano84 said:

Thank you @tuanphan - but the code does not seem to be working. Do you think i may need to get a coder in to take a more details look?

 

Try again with this code (Page Settings > Advanced > Header)

<style>
  .summary-metadata-item {
    visibility: hidden;
}
  .summary-metadata-item a {
    visibility: visible;
}
</style>

 

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

@Deano84, I helped someone with the comma issue in one of the Squarespace Facebook groups. You can remove them with JavaScript, are you wanting to remove them entirely?

If so the issue you may run into is you still need some way to distinguish between the start and end of a particular category. A common look is to use "middots" between category labels instead of commas. 

Building · Architecture · Housing vs. Building, Architecture, Housing

If you want to remove the commas I can share the script with you 

Philadelphia, PA

👉 Squarespace Tutorials 

Chat/Message on FB Messenger for quickest responsehttps://m.me/dejaegherryan

 

Link to comment
3 minutes ago, ryandejaegher said:

@Deano84, I helped someone with the comma issue in one of the Squarespace Facebook groups. You can remove them with JavaScript, are you wanting to remove them entirely?

If so the issue you may run into is you still need some way to distinguish between the start and end of a particular category. A common look is to use "middots" between category labels instead of commas. 

Building · Architecture · Housing vs. Building, Architecture, Housing

If you want to remove the commas I can share the script with you 

Hi @ryandejaegher - I have hidden some categories from page view, as they are for filtering purposes only - however, the separators are still visible. So i am looking to remove the redundant commas. May code to replace with a double could be the answer?

 

Link to comment

@ryandejaegher - I've just tested @tuanphan's code and it now works! 🙂

I have one other question that you may be able to help with ... I implemented the code from May 26 allowing be to hide the Categories relating to location. However, it only seems to work for the first 30 posts and the 'location' categories appear on the older posts. Can this be overcome? i.e. see below:

343821280_Screenshot2020-06-15at15_09_22.thumb.png.21d7fd6d15b60630f43dbea3d89fd787.png

Link to comment
On 6/15/2020 at 3:10 PM, Deano84 said:

@ryandejaegher - I've just tested @tuanphan's code and it now works! 🙂

I have one other question that you may be able to help with ... I implemented the code from May 26 allowing be to hide the Categories relating to location. However, it only seems to work for the first 30 posts and the 'location' categories appear on the older posts. Can this be overcome? i.e. see below:

343821280_Screenshot2020-06-15at15_09_22.thumb.png.21d7fd6d15b60630f43dbea3d89fd787.png

Afternoon chaps - I was just wondering if your were able to provide any insight into the above?

Many many thanks

Dean

Link to comment

Archived

This topic is now archived and is closed to further replies.

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