Jump to content

Looking for a way to get the category/tag of individual Summary Block items using JavaScript

Recommended Posts

Hi everyone,

As the title says, I'm looking for a way to identify the tags/categories of individual summary block items (pulled from a blog page) using JavaScript.

I've tried traversing the DOM for any mention of associated data but I came up short.

I was wondering if anyone had any way of accomplishing this?

Many thanks.

Link to comment

Hi tuanphan,

Here is the link: https://www.pixelhaze.academy/test

Effectively, what I'm trying to do is discover the tags/categories for the individual summary items in the summary block on the page using JS on the page that houses the summary block.

For example, the "FREE SQUARESPACE PLUGINS: 11 FREE SQUARESPACE CSS CUSTOM CODE TO SPRUCE UP SQSP" blog post has the tags "custom css for squarespace" and "squarespace css code", whereas the the blog post "SEO FOR BRANDED SEARCH - WHY IT IS VITAL TO YOUR BOTTOM LINE AND WHAT YOU NEED TO DO" blog post has the tags "squarespace seo" and "local seo".

Link to comment

To get to categories and tags you'd need to set the meta data options thusly.

1815981021_ScreenShot2022-06-20at1_02_46PM.thumb.png.5bd9298f0d2ee927ce702db190842d10.png

An alternate that might provide more flexibility but is more complex programmatically, if you use the callback feature, would be Lazy Summaries.

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.