Jump to content

How do I change the text on the category filtered page?

Recommended Posts

Site URL: https://magnolia-shark-g9jd.squarespace.com/jobs-master?category=Ireland?category=Ireland

Password: fiossftw

I'm trying to change the text in the screenshot that says: "Posts in Ireland" to say "Jobs in Ireland"

I used this code to make this change, but it affects all categories. So the page that should say "Jobs in United States" for example, ends up being changed to "Jobs in Ireland" as well. How can I target the categories separately? I tried putting the code as header injection and Custom CSS to no avail.

.BlogList-filter {
  font-size: 0!important;
}

.BlogList-filter::before {
  content: "Jobs in Ireland"!important;
  font-size: 16px;
  color: hsla(202, 100%, 27%,.9);
  font-family: nunito-sans!important;
}

 

Screen Shot 2020-03-24 at 4.12.25 PM.png

Link to comment

Add to Code Injection Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
  // tuan 10mi
  // change tuanphan to text you want
  jQuery(function($){
  $(".BlogList-filter").html(function() { 
          return $(this).html().replace("Posts in", "tuan phan");  
    });
});

</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
  • 2 years later...

Hey @tuanphan sorry to resurrect an old thread.

Thank you for the answer that you provided previously here. I'm using this approach to try and hide "Posts in" altogether and instead want to just show the category name.

That's seems to be working in the SS preview, but on the live site "Posts in" still outputs on the first page load, but does disappear if you refresh the page. Is it possible that the footer code injection is being ignored on first load? I've tried adding it to the header instead of the footer and had the same issue. 

Any thoughts would be really appreciated if you have time to give it a quick look.

Thanks,
Neal

 

 

Edited by neal_bryant
Link to comment
On 4/12/2022 at 7:00 PM, neal_bryant said:

Hey @tuanphan sorry to resurrect an old thread.

Thank you for the answer that you provided previously here. I'm using this approach to try and hide "Posts in" altogether and instead want to just show the category name.

That's seems to be working in the SS preview, but on the live site "Posts in" still outputs on the first page load, but does disappear if you refresh the page. Is it possible that the footer code injection is being ignored on first load? I've tried adding it to the header instead of the footer and had the same issue. 

The site is available here: https://www.rhitrition.com/food/category/Breakfast and i'm using SS v7.0. 

Any thoughts would be really appreciated if you have time to give it a quick look.

Thanks,
Neal

 

 

Hi,

Try Design > Site Styles > Disable Ajax Loading

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.