Jump to content

Show filtered category name at the top of the filtered content page

Recommended Posts

@dbailey

I have found the issue! You have discovered a bug in my twcsl code. I will endeavor to fix it. Please give me several days. Please bump this thread if I don't get back to you.

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

@dbailey

In the code you installed find the following line.

<script src="https://domain.removed.old.version/twcsl/0.1d16/twcsl.js"></script>

In that line change d16 to d17

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
22 hours ago, creedon said:

@dbailey

In the code you installed find the following line.

<script src="https://d1j8mu9lowy9zf.cloudfront.net/twcsl/0.1d16/twcsl.js"></script>

In that line change d16 to d17

Let us know how it goes.

Still no joy with this I'm afraid @creedon – the code is live if you get chance to inspect.

Edit - so now I can see the custom title when I click the category from a meta link, however the title doesn’t display if clicked from the nav. Something to do with the way the URLs are structured? Meta results in a ‘/category’ whereas the nav results in a ‘blog?category=CategoryName’

No title:
https://crow-crimson-r85z.squarespace.com/uk/dogs/blog?category=Care

Title:
https://crow-crimson-r85z.squarespace.com/uk/dogs/blog/category/Care

Edited by dbailey
Link to comment
13 hours ago, dbailey said:

Something to do with the way the URLs are structured?

Yes that is exactly the issue! For some reason SS on the blog pages uses the /category/Care style for the links but when you create nav links with the SS interface they use the ?category=Care.

Looks like I'll need to account for that in my next version of twcsl!

In the meantime you could edit the Link pages and change the format of the URLs to the /category/Care style.

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

Thank you so much @creedon, I've updated the nav URLs and now that is pulling through!

Last question if I may. How do I now make that title unique for each category page? i.e Care has its own title, Play has its own title, Walk has its own title, etc? It looks as though that is happening with the original posters blog, whereby the prefixText and suffixText from your code is unique to each category. 

Link to comment
11 hours ago, dbailey said:

How do I now make that title unique for each category page? i.e Care has its own title, Play has its own title, Walk has its own title, etc? It looks as though that is happening with the original posters blog, whereby the prefixText and suffixText from your code is unique to each category. 

The category is unique for each page. The prefix and suffix text is the same across all pages. Examples.

1274895134_ScreenShot2022-01-12at11_49_25AM.png.0206775cdb21e808c63a22b36c812f4d.png

1236541896_ScreenShot2022-01-12at11_49_45AM.png.629bff2b806f88d16255324c8c95e3a3.png

Do you need to have each category page have not only the category but unique text as well?

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
  • 3 months later...
  • 2 weeks later...
  • 8 months later...
4 hours ago, golivehq said:

they want author names to appear if someone clicks on an author bio.

Please post the URL for a page on your site where we can see your issue.

A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

Please set up a site-wide password, if your site is not public and you've not already done so.

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 site-wide password and how to share a link documentation to understand how they work.

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
  • 1 month later...
19 hours ago, ThommyP said:

Any solution to this?

Please post the URL for a page on your site where we can see your issue.

A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

Please set up a site-wide password, if your site is not public and you've not already done so.

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 site-wide password and how to share a link documentation to understand how they work.

We can then take a look at your issue.

You may find How to post a forum question post useful.

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

Hi @creedon

I have sedonastarsongs.com

My goal is to use your code so that I can use Tags on the blog posts, then have unique Tag URLs that show the Tag name at the top of the tag page, plus have unique SEO title.  I installed the twcsl file, and the custom code that you provided but I am not seeing the Tag name appear at the top of the tag page.  I also don't know how to make the page have a unique SEO title tag.  Do you mind checking what I've done and let me know how to fix it?  Thank you!

You can see an example of a tag page here: https://www.sedonastarsongs.com/home/tag/crystals

Edited by cka
Link to comment
37 minutes ago, cka said:

I installed the twcsl file, and the custom code that you provided but I am not seeing the Tag name appear at the top of the tag page.

You need to set the options in the code.

Quote

I also don't know how to make the page have a unique SEO title tag.

Is this what you are looking for?

ScreenShot2023-03-01at1_15_30PM.png.6d4b9c366b7233fb208591700cd430d0.png

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.  I set the tag code to "true" but now it's showing this on the tag page:

image.thumb.png.892c1fe15b06e384c3d3bd5ab8e71ae2.png

 

I just want it to say the tag name. For example, on this page it should just say "crystals" there, not any of the other words.  

 

FYI - I removed the tags for now, so you won't be able to see it live on the site.  You can still see the code however.

 

Edited by cka
Link to comment

And for the SEO title, I'm not looking for the Blog post themselves.  I'd like to make each of these Tag pages have a unique SEO title that includes the tag, rather than being a copy of the blogroll or homepage title tag.  For example, on the Crystals tag page, the SEO title tag should say "Crystals - Sedona Star Songs"

Link to comment
18 minutes ago, cka said:

I set the tag code to "true" but now it's showing this on the tag page

You need to change the prefixText and suffixText to what you want. It's just below the previous change you made.

If you remove the crystal tag I can't diagnose issues.

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

@creedon Finally actually following up on this! Sorry for the wait. Here's my original comment: 

Quote

 

By chance, is there a version of this code that also would work for Blog Post Authors? We have a client that we used this on and it worked great! But in addition to categories and tags, they want author names to appear if someone clicks on an author bio. Let me know! Thank you! 


 

Here is the site: https://www.risenmotherhood.com/ 

Here's a page example of where we have posts from an author, but we'd like to see the author name at the top of the page: https://www.risenmotherhood.com/articles?author=63f9237ac2dafc54936f0890 

We have it working great for categories and tags, shown here: https://www.risenmotherhood.com/articles/category/Disability 

 

Let me know if this is possible! 

Link to comment
1 hour ago, golivehq said:

By chance, is there a version of this code that also would work for Blog Post Authors?

By default SS doesn't expose the author profile information to the blog list page. You can show the author name in the meta info.

ScreenShot2023-03-01at4_38_43PM.png.5c00c21a57a173dd5cde69bf42592083.png

It may be possible to come up with some code that would allow you to enter manually the profiles and then present them in some fashion on the blog listing by linking to the displayed author name.

I know of no code that does this currently.

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

Hi @creedon Thanks for helping me out.  I entered tags onto the site, you can see an example of a tag page here: https://www.sedonastarsongs.com/home/tag/thunder+mountain

First question, I have your code entered, but the header text is not reflecting the page's unique tag.  Instead it's showing the site title.  What do I need to tweak so that the tag page header shows that page's tag?

Second question, on this tag page, I'd like the SEO title tag to reflect the page's tag as well, and not be the overall website title.  Can I enter code to adjust that, so that each of these tag pages have a unique SEO title tag?

Third question, in the backend where it shows this "placeholder" header, can I change these letters so it says something else, and not this?  Is it okay to change that in the code?image.png.d76aed41c54db2dd040ca5a2e44de338.png

Thank you!

Edited by cka
Link to comment
4 hours ago, cka said:

I have your code entered, but the header text is not reflecting the page's unique tag.  Instead it's showing the site title.  What do I need to tweak so that the tag page header shows that page's tag?

You've found a bug in my code. Thank you! I'll need to cogitate on how to go about a fix.

In the meantime go into the code and set the tag true value to false. Also remove the page section with the [[bpstrwcotob]] text.

Quote

Second question, on this tag page, I'd like the SEO title tag to reflect the page's tag as well, and not be the overall website title.  Can I enter code to adjust that, so that each of these tag pages have a unique SEO title tag?

I think this might be accomplished. I know of no code that currently does this.

Quote

Third question, in the backend where it shows this "placeholder" header, can I change these letters so it says something else, and not this?  Is it okay to change that in the code?

Yes. You may want to hold off until I come up with a fix for the bug.

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

I have updated my twcsl code which my cited code in my February 12th 2021 post depends on.

From the changes...

fix for blog tag not returning tag

@cka You'll want to reinstall twcsl per the Install steps. Be sure to remove the old version of twcsl. 

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

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.